Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] (PR#15610) SDL client: crash in 320x240 resolution
Home

[Freeciv-Dev] (PR#15610) SDL client: crash in 320x240 resolution

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: himasaram@xxxxxxxx
Subject: [Freeciv-Dev] (PR#15610) SDL client: crash in 320x240 resolution
From: "Christian Prochaska" <cp.ml.freeciv.dev@xxxxxxxxxxxxxx>
Date: Sat, 18 Feb 2006 05:21:57 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [dmarks - Sa 18. Feb 2006, 10:55:45]:
> 
> It's impossible to start a game in 320x240 res. When you try to connect
> to the server, the client will crash with: 
> 
> 0: Detected fatal error in gui_string.c line 549:
> 0: Can't convert string to const width
> civclient: shared.c:716: real_die: Assertion `0' failed.
> Aborted
> 

It should work when you enable the SMALL_SCREEN define in gui_main.h.
However, this resolution shouldn't be selectable when SMALL_SCREEN is
not defined (patch attached).

> I suggest you remove that resolution altogether. It's not like the game
> would be playable even if you could start it. ;-)
> 
> -Daniel
> 

It may not be playable for now, but hopefully will be in the future :-)
It's one of my goals for the SDL client to have it playable on the
Pocket PC platform. I wrote a bit about this some time ago:

http://lists.complete.org/freeciv-dev@xxxxxxxxxxx/2005/11/msg00391.html.gz

but for now, fixing bugs has the highest priority ;-)
Index: client/gui-sdl/optiondlg.c
===================================================================
--- client/gui-sdl/optiondlg.c  (Revision 11612)
+++ client/gui-sdl/optiondlg.c  (Arbeitskopie)
@@ -696,8 +696,7 @@
   /* create modes buttons */
   for (i = 0; pModes_Rect[i]; i++) {
     if (i && ((pModes_Rect[i]->w == pModes_Rect[i - 1]->w)
-      || ((pModes_Rect[i]->w < 640 && pModes_Rect[i]->h < 480)
-         && !(pModes_Rect[i]->w == 320 && pModes_Rect[i]->h == 240)))) {
+      || ((pModes_Rect[i]->w < 640 && pModes_Rect[i]->h < 480)))) {
       continue;
     }
   
Index: client/gui-sdl/gui_tilespec.c
===================================================================
--- client/gui-sdl/gui_tilespec.c       (Revision 11612)
+++ client/gui-sdl/gui_tilespec.c       (Arbeitskopie)
@@ -31,6 +31,7 @@
 /* gui-sdl */
 #include "graphics.h"
 #include "gui_main.h"
+#include "gui_zoom.h"
 #include "themespec.h"
 
 #include "gui_tilespec.h"
Index: client/gui-sdl/gui_main.c
===================================================================
--- client/gui-sdl/gui_main.c   (Revision 11612)
+++ client/gui-sdl/gui_main.c   (Arbeitskopie)
@@ -59,7 +59,7 @@
 #include "diplodlg.h"
 #include "graphics.h"
 #include "gui_id.h"
-#include "gui_stuff.h"         /* gui */
+#include "gui_stuff.h"
 #include "gui_tilespec.h"
 #include "inteldlg.h"
 #include "mapctrl.h"
@@ -815,7 +815,13 @@
     FREESURFACE(pBgd);
     SDL_WM_SetCaption("SDLClient of Freeciv", "FreeCiv");
   } else {
+    
+#ifndef SMALL_SCREEN
     set_video_mode(640, 480, SDL_SWSURFACE | SDL_ANYFORMAT);
+#else
+    set_video_mode(320, 240, SDL_SWSURFACE | SDL_ANYFORMAT);
+#endif    
+    
     if(pBgd) {
       blit_entire_src(pBgd, Main.map, (Main.map->w - pBgd->w) / 2,
                                      (Main.map->h - pBgd->h) / 2);
Index: client/gui-sdl/gui_stuff.c
===================================================================
--- client/gui-sdl/gui_stuff.c  (Revision 11612)
+++ client/gui-sdl/gui_stuff.c  (Arbeitskopie)
@@ -32,7 +32,6 @@
 #include "gui_id.h"
 #include "gui_main.h"
 #include "gui_tilespec.h"
-#include "gui_zoom.h"
 #include "mapview.h"
 #include "themecolors.h"
 #include "unistring.h"
Index: client/gui-sdl/cityrep.c
===================================================================
--- client/gui-sdl/cityrep.c    (Revision 11612)
+++ client/gui-sdl/cityrep.c    (Arbeitskopie)
@@ -32,7 +32,6 @@
 #include "gui_main.h"
 #include "gui_stuff.h"
 #include "gui_tilespec.h"
-#include "gui_zoom.h"
 #include "mapctrl.h"
 #include "mapview.h"
 #include "repodlgs.h"
Index: client/gui-sdl/mapctrl.c
===================================================================
--- client/gui-sdl/mapctrl.c    (Revision 11612)
+++ client/gui-sdl/mapctrl.c    (Arbeitskopie)
@@ -50,7 +50,6 @@
 #include "gui_main.h"
 #include "gui_stuff.h"
 #include "gui_tilespec.h"
-#include "gui_zoom.h"
 #include "mapview.h"
 #include "menu.h"
 #include "messagewin.h"
Index: client/gui-sdl/graphics.h
===================================================================
--- client/gui-sdl/graphics.h   (Revision 11612)
+++ client/gui-sdl/graphics.h   (Arbeitskopie)
@@ -28,6 +28,7 @@
 
 #include "canvas.h"
 #include "gui_main.h"
+#include "gui_zoom.h"
 
 #define USE_ALPHABLIT
 
Index: client/gui-sdl/connectdlg.c
===================================================================
--- client/gui-sdl/connectdlg.c (Revision 11612)
+++ client/gui-sdl/connectdlg.c (Arbeitskopie)
@@ -45,7 +45,6 @@
 #include "gui_main.h"
 #include "gui_stuff.h"
 #include "gui_tilespec.h"
-#include "gui_zoom.h"
 #include "mapview.h"
 #include "messagewin.h"
 #include "optiondlg.h"

[Prev in Thread] Current Thread [Next in Thread]