# Copyright (C) 2007 Andreas Henriksson <andreas@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.512.dfsg/src/DummyAmanith.py =================================================================== --- fretsonfire-1.2.512.dfsg.orig/src/DummyAmanith.py 2007-09-03 17:06:50.000000000 +0000 +++ fretsonfire-1.2.512.dfsg/src/DummyAmanith.py 2007-11-20 19:16:49.000000000 +0000 @@ -42,7 +42,9 @@ pass def SetViewport(self, x, y, w, h): - glViewport(int(x), int(y), int(w), int(h)) + glw = int(w) + glh = int(h) + glViewport(int(x), int(y), int(glw), int(glh)) def SetProjection(self, left, right, bottom, top): glMatrixMode(GL_PROJECTION) Index: fretsonfire-1.2.512.dfsg/src/GameEngine.py =================================================================== --- fretsonfire-1.2.512.dfsg.orig/src/GameEngine.py 2007-09-09 10:09:41.000000000 +0000 +++ fretsonfire-1.2.512.dfsg/src/GameEngine.py 2007-11-20 19:16:33.000000000 +0000 @@ -165,7 +165,9 @@ geometry = (0, 0, w, h) self.svg = SvgContext(geometry) self.svg.setRenderingQuality(self.config.get("opengl", "svgquality")) - glViewport(int(viewport[0]), int(viewport[1]), int(viewport[2]), int(viewport[3])) + 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.512.dfsg/src/View.py =================================================================== --- fretsonfire-1.2.512.dfsg.orig/src/View.py 2007-09-03 16:55:45.000000000 +0000 +++ fretsonfire-1.2.512.dfsg/src/View.py 2007-11-20 19:14:45.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: