[Supertux-Commit] r5481 - in trunk/supertux/src: . video

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Thu May 15 00:08:20 PDT 2008


Author: grumbel
Date: 2008-05-15 00:08:19 -0700 (Thu, 15 May 2008)
New Revision: 5481

Modified:
   trunk/supertux/src/options_menu.cpp
   trunk/supertux/src/video/gl_renderer.cpp
Log:
Do not change video mode when changing fullscreen-res setting

Modified: trunk/supertux/src/options_menu.cpp
===================================================================
--- trunk/supertux/src/options_menu.cpp	2008-05-15 06:33:38 UTC (rev 5480)
+++ trunk/supertux/src/options_menu.cpp	2008-05-15 07:08:19 UTC (rev 5481)
@@ -247,8 +247,7 @@
     case MNID_FULLSCREEN_RESOLUTION:
       if(sscanf(item->list[item->selected].c_str(), "%dx%d", &config->fullscreen_width, &config->fullscreen_height) == 2)
         {
-          Renderer::instance()->apply_config();
-          Menu::recalc_pos();
+          // do nothing, changes are only applied when toggling fullscreen mode
         }      
       break;
 

Modified: trunk/supertux/src/video/gl_renderer.cpp
===================================================================
--- trunk/supertux/src/video/gl_renderer.cpp	2008-05-15 06:33:38 UTC (rev 5480)
+++ trunk/supertux/src/video/gl_renderer.cpp	2008-05-15 07:08:19 UTC (rev 5481)
@@ -509,6 +509,8 @@
 void
 Renderer::resize(int w, int h)
 {
+  // This causes the screen to go black, which is annoying, but seems
+  // unavoidable with SDL at the moment
   SDL_SetVideoMode(w, h, 0, SDL_OPENGL | SDL_RESIZABLE);
 
   config->window_width  = w;




More information about the Supertux-Commit mailing list