From e894dddcb7234127890d2649f7afb862fb489fe4 Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Mon, 9 Apr 2012 21:27:14 +0100 Subject: [PATCH] [Remove] Removed the ResizeWindow() function from Globals. --- src/Global/Globals.cpp | 9 --------- src/Global/Globals.h | 1 - src/Main/main.cpp | 8 +------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Global/Globals.cpp b/src/Global/Globals.cpp index 055df14..5ddada9 100644 --- a/src/Global/Globals.cpp +++ b/src/Global/Globals.cpp @@ -1,14 +1,5 @@ -#include #include "Globals.h" -static void ResizeWindow(int w, int h) { - SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_RESIZABLE); - glViewport(0,0,w,h); - glLoadIdentity(); - glOrtho(0.0, 800.0, 600.0, 0.0, 0.0, 1.0); - SDL_GL_SwapBuffers(); -} - SDL_Surface* screen = NULL; SDL_Event event; diff --git a/src/Global/Globals.h b/src/Global/Globals.h index 8700c69..969a8e3 100644 --- a/src/Global/Globals.h +++ b/src/Global/Globals.h @@ -4,4 +4,3 @@ extern SDL_Surface* screen; extern SDL_Event event; -static void ResizeWindow(int w, int h); diff --git a/src/Main/main.cpp b/src/Main/main.cpp index 09a1e38..c26262b 100644 --- a/src/Main/main.cpp +++ b/src/Main/main.cpp @@ -87,13 +87,7 @@ int main(int argc, char** argv) { break; } if(event.type == SDL_VIDEORESIZE) { -// // Resize the window. -// screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 32, flags); -// // Error? -// if(!screen) { -// Debug::logger->message("Window resize is screwed"); -// Destroy(); -// } + // Resize the window. ResizeWindow(event.resize.w, event.resize.h); break; }