projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26b5a52
)
Hooked up window resize event (not yet implemented in Renderer)
author
Ingo Ruhnke
<grumbel@gmail.com>
Wed, 30 Jul 2014 18:25:46 +0000
(20:25 +0200)
committer
Ingo Ruhnke
<grumbel@gmail.com>
Wed, 30 Jul 2014 18:25:46 +0000
(20:25 +0200)
src/supertux/screen_manager.cpp
patch
|
blob
|
history
diff --git
a/src/supertux/screen_manager.cpp
b/src/supertux/screen_manager.cpp
index
36fdc11
..
353f209
100644
(file)
--- 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)