r4025 - packages/trunk/fretsonfire/debian/patches
Miriam Ruiz
baby-guest at alioth.debian.org
Sat Sep 1 18:06:05 UTC 2007
Author: baby-guest
Date: 2007-09-01 18:06:05 +0000 (Sat, 01 Sep 2007)
New Revision: 4025
Added:
packages/trunk/fretsonfire/debian/patches/typeerror.patch
Log:
Really adding the new patch now :P
Added: packages/trunk/fretsonfire/debian/patches/typeerror.patch
===================================================================
--- packages/trunk/fretsonfire/debian/patches/typeerror.patch (rev 0)
+++ packages/trunk/fretsonfire/debian/patches/typeerror.patch 2007-09-01 18:06:05 UTC (rev 4025)
@@ -0,0 +1,52 @@
+# Copyright (C) 2007 Andreas Henriksson <andreas at fatal.se>
+# Licensed under the GPL, see /usr/share/common-licenses/GPL
+# Fixes crashing on startup due to wrong types. See #437330
+
+Index: fretsonfire-1.2.451.dfsg/src/DummyAmanith.py
+===================================================================
+--- fretsonfire-1.2.451.dfsg.orig/src/DummyAmanith.py 2007-09-01 17:25:47.000000000 +0000
++++ fretsonfire-1.2.451.dfsg/src/DummyAmanith.py 2007-09-01 17:27:19.000000000 +0000
+@@ -39,7 +39,9 @@
+ pass
+
+ def SetViewport(self, x, y, w, h):
+- glViewport(x, y, w, h)
++ glw = int(w)
++ glh = int(h)
++ glViewport(x, y, int(glw), int(glh))
+
+ def SetProjection(self, left, right, bottom, top):
+ glMatrixMode(GL_PROJECTION)
+Index: fretsonfire-1.2.451.dfsg/src/GameEngine.py
+===================================================================
+--- fretsonfire-1.2.451.dfsg.orig/src/GameEngine.py 2007-09-01 17:25:56.000000000 +0000
++++ fretsonfire-1.2.451.dfsg/src/GameEngine.py 2007-09-01 17:27:19.000000000 +0000
+@@ -165,7 +165,9 @@
+ geometry = (0, 0, w, h)
+ self.svg = SvgContext(geometry)
+ self.svg.setRenderingQuality(self.config.get("opengl", "svgquality"))
+- glViewport(*viewport)
++ glw = int(viewport[2])
++ glh = int(viewport[3])
++ glViewport(int(viewport[0]), int(viewport[1]), int(glh), int(glh))
+
+ self.input = Input()
+ self.view = View(self, geometry)
+Index: fretsonfire-1.2.451.dfsg/src/View.py
+===================================================================
+--- fretsonfire-1.2.451.dfsg.orig/src/View.py 2007-09-01 17:25:52.000000000 +0000
++++ fretsonfire-1.2.451.dfsg/src/View.py 2007-09-01 17:27:19.000000000 +0000
+@@ -136,10 +136,10 @@
+
+ viewport = glGetIntegerv(GL_VIEWPORT)
+ if normalize:
+- w = viewport[2] - viewport[0]
+- h = viewport[3] - viewport[1]
++ w = int ( viewport[2] - viewport[0] )
++ h = int ( viewport[3] - viewport[1] )
+ # aspect ratio correction
+- h *= (float(w) / float(h)) / (4.0 / 3.0)
++ h *= int((float(w) / float(h)) / (4.0 / 3.0))
+ viewport = [0, 0, 1, h / w]
+
+ if yIsDown:
More information about the Pkg-games-commits
mailing list