The following commit has been merged in the master branch:
commit 0badd054a8a1bb7f512940c3d63e35ffa3bf56d9
Author: Ansgar Burchardt <[email protected]>
Date:   Fri Feb 25 16:47:14 2011 +0100

    Apply upstream patches to fix crash on resize.
    
     - new patch: 0001-FIX-crashes-with-window-resizing-under-SDL.patch
     - new patch: 
0002-Code-treat-SYSTEM_RESIZE-event-separate-from-other-e.patch

diff --git 
a/debian/patches/0001-FIX-crashes-with-window-resizing-under-SDL.patch 
b/debian/patches/0001-FIX-crashes-with-window-resizing-under-SDL.patch
new file mode 100644
index 0000000..00c89fc
--- /dev/null
+++ b/debian/patches/0001-FIX-crashes-with-window-resizing-under-SDL.patch
@@ -0,0 +1,26 @@
+From ff96ef3e531a30ea61dcef867ecc7344f9b80d32 Mon Sep 17 00:00:00 2001
+From: Dwachs <[email protected]>
+Date: Tue, 22 Feb 2011 14:15:30 +0000
+Subject: [PATCH 1/2] FIX crashes with window resizing under SDL
+
+git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@4319 
8aca7d54-2c30-db11-9de9-000461428c89
+---
+ simsys_s.cc |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/simsys_s.cc b/simsys_s.cc
+index 9a26ff6..457ca16 100644
+--- a/simsys_s.cc
++++ b/simsys_s.cc
+@@ -267,7 +267,7 @@ int dr_textur_resize(unsigned short** textur, int w, int 
h, int bpp)
+               w = 16;
+       }
+ 
+-      if(  w!=screen->w  &&  h!=screen->h  ) {
++      if(  w!=screen->w  ||  h!=screen->h  ) {
+ 
+               width = w;
+               height = h;
+-- 
+1.7.2.3
+
diff --git 
a/debian/patches/0002-Code-treat-SYSTEM_RESIZE-event-separate-from-other-e.patch
 
b/debian/patches/0002-Code-treat-SYSTEM_RESIZE-event-separate-from-other-e.patch
new file mode 100644
index 0000000..25ea016
--- /dev/null
+++ 
b/debian/patches/0002-Code-treat-SYSTEM_RESIZE-event-separate-from-other-e.patch
@@ -0,0 +1,42 @@
+From dc4a52e447c6401d14d5fc2355008d3c000457d1 Mon Sep 17 00:00:00 2001
+From: Dwachs <[email protected]>
+Date: Tue, 22 Feb 2011 14:19:41 +0000
+Subject: [PATCH 2/2] Code: treat SYSTEM_RESIZE event separate from other 
events in pak-selector
+
+git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@4320 
8aca7d54-2c30-db11-9de9-000461428c89
+---
+ simmain.cc |   12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/simmain.cc b/simmain.cc
+index f2b91f3..023691f 100644
+--- a/simmain.cc
++++ b/simmain.cc
+@@ -242,17 +242,19 @@ void modal_dialogue( gui_frame_t *gui, long magic, 
karte_t *welt, bool (*quit)()
+                       // do not move, do not close it!
+                       dr_prepare_flush();
+                       gui->zeichnen( 
koord(win_get_posx(gui),win_get_posy(gui)), gui->get_fenstergroesse() );
+-                      display_poll_event(&ev);
+-                      // main window resized
+-                      check_pos_win(&ev);
+                       dr_flush();
+-                      dr_sleep(50);
+-                      // main window resized
++
++                      display_poll_event(&ev);
+                       if(ev.ev_class==EVENT_SYSTEM  &&  
ev.ev_code==SYSTEM_RESIZE) {
+                               // main window resized
+                               simgraph_resize( ev.mx, ev.my );
+                               display_fillbox_wh( 0, 0, ev.mx, ev.my, 
COL_BLACK, true );
+                       }
++                      else {
++                              // other events
++                              check_pos_win(&ev);
++                      }
++                      dr_sleep(50);
+               }
+               set_pointer(1);
+               display_fillbox_wh( 0, 0, display_get_width(), 
display_get_height(), COL_BLACK, true );
+-- 
+1.7.2.3
+
diff --git a/debian/patches/series b/debian/patches/series
index 6681fb7..ada58ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,5 @@ path-for-game-data.diff
 config.diff
 sha1-replacement.diff
 link-less-libraries.diff
+0001-FIX-crashes-with-window-resizing-under-SDL.patch
+0002-Code-treat-SYSTEM_RESIZE-event-separate-from-other-e.patch

-- 
transportation simulator

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

Reply via email to