r4034 - packages/trunk/tumiki-fighters/debian/patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Sun Sep 2 18:19:33 UTC 2007
Author: pdewacht-guest
Date: 2007-09-02 18:19:32 +0000 (Sun, 02 Sep 2007)
New Revision: 4034
Added:
packages/trunk/tumiki-fighters/debian/patches/window-resizing.patch
Modified:
packages/trunk/tumiki-fighters/debian/patches/series
Log:
fix window resizing code
Modified: packages/trunk/tumiki-fighters/debian/patches/series
===================================================================
--- packages/trunk/tumiki-fighters/debian/patches/series 2007-09-01 20:41:32 UTC (rev 4033)
+++ packages/trunk/tumiki-fighters/debian/patches/series 2007-09-02 18:19:32 UTC (rev 4034)
@@ -4,3 +4,4 @@
dotfile.patch
makefile.patch
gdc-0.24-semantics-for-version.patch
+window-resizing.patch
Added: packages/trunk/tumiki-fighters/debian/patches/window-resizing.patch
===================================================================
--- packages/trunk/tumiki-fighters/debian/patches/window-resizing.patch (rev 0)
+++ packages/trunk/tumiki-fighters/debian/patches/window-resizing.patch 2007-09-02 18:19:32 UTC (rev 4034)
@@ -0,0 +1,31 @@
+Index: tumiki-fighters-0.2.dfsg1/src/abagames/util/sdl/screen3d.d
+===================================================================
+--- tumiki-fighters-0.2.dfsg1.orig/src/abagames/util/sdl/screen3d.d 2007-09-01 11:44:08.000000000 +0200
++++ tumiki-fighters-0.2.dfsg1/src/abagames/util/sdl/screen3d.d 2007-09-01 11:47:06.000000000 +0200
+@@ -23,6 +23,7 @@
+ static bool windowMode = true;
+ static float nearPlane = 0.1;
+ static float farPlane = 1000;
++ static Uint32 videoFlags;
+
+ private:
+
+@@ -36,7 +37,6 @@
+ "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError()));
+ }
+ // Create an OpenGL screen.
+- Uint32 videoFlags;
+ if (windowMode) {
+ videoFlags = SDL_OPENGL | SDL_RESIZABLE;
+ } else {
+@@ -56,6 +56,10 @@
+ // 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