From 8db371bb7a7a77284cff1e08b7d23c4e8428aa3c Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Wed, 30 Jul 2014 20:25:46 +0200 Subject: [PATCH] Hooked up window resize event (not yet implemented in Renderer) --- src/supertux/screen_manager.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp index 36fdc115f..353f20951 100644 --- a/src/supertux/screen_manager.cpp +++ b/src/supertux/screen_manager.cpp @@ -206,10 +206,16 @@ const Uint8 *keystate = SDL_GetKeyboardState(NULL); //edited by giby quit(); break; - // case SDL_ResizeEvent: //edit by giby - // Renderer::instance()->resize(event.resize.w, event.resize.h); - // MenuManager::recalc_pos(); - // break; + case SDL_WINDOWEVENT: + switch(event.window.type) + { + case SDL_WINDOWEVENT_RESIZED: + Renderer::instance()->resize(event.window.data1, + event.window.data2); + MenuManager::recalc_pos(); + break; + } + break; case SDL_KEYDOWN: if (event.key.keysym.sym == SDLK_F10) -- 2.11.0