From: Ingo Ruhnke Date: Wed, 30 Jul 2014 18:25:46 +0000 (+0200) Subject: Hooked up window resize event (not yet implemented in Renderer) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8db371bb7a7a77284cff1e08b7d23c4e8428aa3c;p=supertux.git Hooked up window resize event (not yet implemented in Renderer) --- 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)