Author: goneri
Date: 2009-05-11 21:46:11 +0000 (Mon, 11 May 2009)
New Revision: 9713

Added:
   packages/trunk/bloboats/debian/patches/fix_segfault_notebook.diff
Modified:
   packages/trunk/bloboats/debian/changelog
   packages/trunk/bloboats/debian/patches/series
Log:
* Add fix_segfault_notebook.diff to avoid a segfault if the screen
  doesn't accept 1024x768 like most of the notebook computer
  (Closes: #523271)
* Prepare upload to unstable


Modified: packages/trunk/bloboats/debian/changelog
===================================================================
--- packages/trunk/bloboats/debian/changelog    2009-05-11 19:54:28 UTC (rev 
9712)
+++ packages/trunk/bloboats/debian/changelog    2009-05-11 21:46:11 UTC (rev 
9713)
@@ -1,4 +1,4 @@
-bloboats (1.0.1.dsfg-3) UNRELEASED; urgency=low
+bloboats (1.0.1.dsfg-3) unstable; urgency=low
 
   [ Paul Wise ]
   * Add a watch file
@@ -11,6 +11,9 @@
    - do not ignore 'make clean' return
   * deals correctly with noopt and debug, thanks Raphael Geisser
   * Apply Raphael Geisser patch to pass correct parameter to SDL_SetVideoMode
+  * Add fix_segfault_notebook.diff to avoid a segfault if the screen
+    doesn't accept 1024x768 like most of the notebook computer
+    (Closes: #523271)
 
  -- Gonéri Le Bouder <[email protected]>  Sun, 19 Apr 2009 00:00:15 +0200
 

Added: packages/trunk/bloboats/debian/patches/fix_segfault_notebook.diff
===================================================================
--- packages/trunk/bloboats/debian/patches/fix_segfault_notebook.diff           
                (rev 0)
+++ packages/trunk/bloboats/debian/patches/fix_segfault_notebook.diff   
2009-05-11 21:46:11 UTC (rev 9713)
@@ -0,0 +1,39 @@
+--- bloboats-1.0.1.dsfg.orig/src/main.cpp
++++ bloboats-1.0.1.dsfg/src/main.cpp
+@@ -197,7 +197,7 @@
+ 
+       if (Config.fullscreen) flags |= SDL_FULLSCREEN;
+ 
+-      SDL_Surface *s;
++      SDL_Surface *s = NULL;
+ 
+       if (!manualres) {
+               switch(Config.resolution) {
+@@ -217,9 +217,13 @@
+                               s = Window.OpenWindow(1280, 1024, 32, flags);
+                       break;
+                       default:
+-                              s = Window.OpenWindow(640, 480, 32, flags);
++                              // Do nothing
+                       break;
+               }
++
++              if (!s)
++                      s = Window.OpenWindow(640, 480, 32, flags);
++
+       } else {
+               s = Window.OpenWindow(reswidth, resheight, 32, flags);
+       }
+--- bloboats-1.0.1.dsfg.orig/src/window.cpp
++++ bloboats-1.0.1.dsfg/src/window.cpp
+@@ -53,6 +53,10 @@
+ 
+ 
+       screen = SDL_SetVideoMode(width, height, bpp, flags);
++
++      if (!screen)
++              return NULL;
++
+       SDL_EventState(SDL_VIDEOEXPOSE, SDL_ENABLE);
+ 
+       // Set viewport

Modified: packages/trunk/bloboats/debian/patches/series
===================================================================
--- packages/trunk/bloboats/debian/patches/series       2009-05-11 19:54:28 UTC 
(rev 9712)
+++ packages/trunk/bloboats/debian/patches/series       2009-05-11 21:46:11 UTC 
(rev 9713)
@@ -1,2 +1,3 @@
+fix_segfault_notebook.diff
 fix_makefile.patch
 uint32.diff


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to