Fix duplicate creation of window (makes fullscreen mode work on OSX)
commite74536231a83c7c1a59c54a5e8e8fafdd33b635c
authorThomas Perl <thp@perli.net>
Sun, 24 May 2009 15:43:23 +0000 (24 17:43 +0200)
committerThomas Perl <thp@perli.net>
Sun, 24 May 2009 15:43:23 +0000 (24 17:43 +0200)
tree2d191bf3ab88097f9b8700760a927debe51660f2
parent44200f8b741aa7fc53ec5cac136543b7c9a404ba
Fix duplicate creation of window (makes fullscreen mode work on OSX)

Thanks to gdb, after hours of fidding, I finally found out why
this stupid fullscreen mode would not work: The code was instantiating
two instances of Window, both calling SDL_SetVideoMode and then the
second one would invalidate the first one, which is in turn used by
the drawing code to update the screen.

This has been fixed by creating the Window only once and passing the
Window object from the Game object to App, which can then pass it on
to all the other widgets and layers that need to draw to the screen.
App.cpp
Game.cpp
Game.h
Ui.h