r4036 - packages/trunk/parsec47/debian/patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Sun Sep 2 18:30:05 UTC 2007
Author: pdewacht-guest
Date: 2007-09-02 18:30:05 +0000 (Sun, 02 Sep 2007)
New Revision: 4036
Added:
packages/trunk/parsec47/debian/patches/window-resizing.patch
Modified:
packages/trunk/parsec47/debian/patches/series
Log:
fix window resizing code
Modified: packages/trunk/parsec47/debian/patches/series
===================================================================
--- packages/trunk/parsec47/debian/patches/series 2007-09-02 18:27:45 UTC (rev 4035)
+++ packages/trunk/parsec47/debian/patches/series 2007-09-02 18:30:05 UTC (rev 4036)
@@ -3,3 +3,4 @@
windowed.patch
dotfile.patch
makefile.patch
+window-resizing.patch
Added: packages/trunk/parsec47/debian/patches/window-resizing.patch
===================================================================
--- packages/trunk/parsec47/debian/patches/window-resizing.patch (rev 0)
+++ packages/trunk/parsec47/debian/patches/window-resizing.patch 2007-09-02 18:30:05 UTC (rev 4036)
@@ -0,0 +1,33 @@
+Index: parsec47-0.2.dfsg1/src/abagames/util/sdl/Screen3D.d
+===================================================================
+--- parsec47-0.2.dfsg1.orig/src/abagames/util/sdl/Screen3D.d 2007-09-02 20:28:42.000000000 +0200
++++ parsec47-0.2.dfsg1/src/abagames/util/sdl/Screen3D.d 2007-09-02 20:29:40.000000000 +0200
+@@ -51,6 +51,8 @@
+
+ private:
+
++ static Uint32 videoFlags;
++
+ protected abstract void init();
+ protected abstract void close();
+
+@@ -65,7 +67,6 @@
+ "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError()));
+ }
+ // Create an OpenGL screen.
+- Uint32 videoFlags;
+ if (windowMode) {
+ videoFlags = SDL_OPENGL | SDL_RESIZABLE;
+ } else {
+@@ -84,6 +85,11 @@
+ // Reset viewport when the screen is resized.
+
+ private 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