<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39667 >

> [EMAIL PROTECTED] - Di 04. Sep 2007, 13:09:46]:
> 
> If you run it in windowed mode, you can't resize the game by resizing
> the window. The game display logic should be independent of the
> resolution, an absraction that many games fail to make.
> 

I believe the SDL client was targeted at fullscreen mode in the first
place (inspired by Civ3) with windowed mode only as an optional feature.
Changing the code to support on-the-fly resizing seems almost impossible
to me now. If I had the time I would port the SDL GUI to GTK+ and make
use of its automatic layout management, but for now I can only mark the
window as unresizable to at least avoid the black areas when attemting
to resize the window frame. Patch attached.
Index: client/gui-sdl/gui_main.c
===================================================================
--- client/gui-sdl/gui_main.c	(revision 13502)
+++ client/gui-sdl/gui_main.c	(working copy)
@@ -800,7 +800,7 @@
 #endif
   
   if(pBgd && SDL_GetVideoInfo()->wm_available) {
-    set_video_mode(pBgd->w, pBgd->h, SDL_SWSURFACE | SDL_ANYFORMAT | SDL_RESIZABLE);
+    set_video_mode(pBgd->w, pBgd->h, SDL_SWSURFACE | SDL_ANYFORMAT);
 #if 0    
     /*
      * call this for other that X enviroments - currently not supported.
@@ -954,7 +954,7 @@
       #else
         /* small screen on desktop -> don't set 320x240 fullscreen mode */
         set_video_mode(gui_sdl_screen_width, gui_sdl_screen_height,
-                       SDL_SWSURFACE | SDL_ANYFORMAT | SDL_RESIZABLE);
+                       SDL_SWSURFACE | SDL_ANYFORMAT);
       #endif
     #else
       set_video_mode(gui_sdl_screen_width, gui_sdl_screen_height,
@@ -969,11 +969,11 @@
                      SDL_SWSURFACE | SDL_ANYFORMAT);
       #else
       set_video_mode(gui_sdl_screen_width, gui_sdl_screen_height,
-                     SDL_SWSURFACE | SDL_ANYFORMAT | SDL_RESIZABLE);
+                     SDL_SWSURFACE | SDL_ANYFORMAT);
       #endif
     #else
     set_video_mode(gui_sdl_screen_width, gui_sdl_screen_height,
-      SDL_SWSURFACE | SDL_ANYFORMAT | SDL_RESIZABLE);
+      SDL_SWSURFACE | SDL_ANYFORMAT);
     #endif
     
 #if 0    
Index: client/gui-sdl/optiondlg.c
===================================================================
--- client/gui-sdl/optiondlg.c	(revision 13502)
+++ client/gui-sdl/optiondlg.c	(working copy)
@@ -427,7 +427,6 @@
   
     if (gui_sdl_fullscreen != BOOL_VAL(Main.screen->flags & SDL_FULLSCREEN)) {
       tmp_flags ^= SDL_FULLSCREEN;
-      tmp_flags ^= SDL_RESIZABLE;
     }
   
     mode = MAX_ID - pWidget->ID;
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to