r4038 - packages/trunk/a7xpg/debian/patches

Peter De Wachter pdewacht-guest at alioth.debian.org
Sun Sep 2 18:35:13 UTC 2007


Author: pdewacht-guest
Date: 2007-09-02 18:35:13 +0000 (Sun, 02 Sep 2007)
New Revision: 4038

Added:
   packages/trunk/a7xpg/debian/patches/window-resizing.patch
Modified:
   packages/trunk/a7xpg/debian/patches/series
Log:
fix window resizing code


Modified: packages/trunk/a7xpg/debian/patches/series
===================================================================
--- packages/trunk/a7xpg/debian/patches/series	2007-09-02 18:33:23 UTC (rev 4037)
+++ packages/trunk/a7xpg/debian/patches/series	2007-09-02 18:35:13 UTC (rev 4038)
@@ -9,3 +9,4 @@
 directories.patch
 windowed.patch
 makefile.patch
+window-resizing.patch

Added: packages/trunk/a7xpg/debian/patches/window-resizing.patch
===================================================================
--- packages/trunk/a7xpg/debian/patches/window-resizing.patch	                        (rev 0)
+++ packages/trunk/a7xpg/debian/patches/window-resizing.patch	2007-09-02 18:35:13 UTC (rev 4038)
@@ -0,0 +1,32 @@
+Index: a7xpg-0.11.dfsg1/src/abagames/util/sdl/Screen3D.d
+===================================================================
+--- a7xpg-0.11.dfsg1.orig/src/abagames/util/sdl/Screen3D.d	2007-09-02 20:34:16.000000000 +0200
++++ a7xpg-0.11.dfsg1/src/abagames/util/sdl/Screen3D.d	2007-09-02 20:34:43.000000000 +0200
+@@ -26,6 +26,7 @@
+   float farPlane = 1000;
+ 
+  private:
++  Uint32 videoFlags;
+ 
+   protected abstract void init();
+   protected abstract void close();
+@@ -41,7 +42,6 @@
+ 	"Unable to initialize SDL: " ~ string.toString(SDL_GetError()));
+     }
+     // Create an OpenGL screen.
+-    Uint32 videoFlags;
+     if (windowMode) {
+       videoFlags = SDL_OPENGL | SDL_RESIZABLE;
+     } else {
+@@ -61,6 +61,11 @@
+   // Reset viewport when the screen is resized.
+ 
+   public void screenResized() {
++    if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) {
++      throw new Exception
++        ("Unable to resize SDL screen: " ~ std.string.toString(SDL_GetError()));
++    }
++
+     glViewport(0, 0, width, height);
+     glMatrixMode(GL_PROJECTION);
+     glLoadIdentity();




More information about the Pkg-games-commits mailing list