# Disclaimer: I know nothing about python. Never expect any python
# changes I do to be correct.
tags 437330 + patch
thanks

Hello David!

I had the same problem as you reported about the FretsOnFire game in
Debian crashing on startup. The changes in the attached patch made it
work for me.
(Now the biggest remaining problem is that I miss every note. ;P)

HTH, HAND!

-- 
Regards,
Andreas Henriksson
diff -uri ./game/DummyAmanith.py /tmp/fretsonfire/game/DummyAmanith.py
--- ./game/DummyAmanith.py	2007-02-20 20:42:46.000000000 +0100
+++ /tmp/fretsonfire/game/DummyAmanith.py	2007-08-18 16:09:05.000000000 +0200
@@ -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, GLsizei(glw), GLsizei(glh))
 
   def SetProjection(self, left, right, bottom, top):
     glMatrixMode(GL_PROJECTION)
diff -uri ./game/GameEngine.py /tmp/fretsonfire/game/GameEngine.py
--- ./game/GameEngine.py	2007-04-07 10:11:34.000000000 +0200
+++ /tmp/fretsonfire/game/GameEngine.py	2007-08-18 16:18:03.000000000 +0200
@@ -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]), GLsizei(glh), GLsizei(glh))
 
     self.input     = Input()
     self.view      = View(self, geometry)
diff -uri ./game/View.py /tmp/fretsonfire/game/View.py
--- ./game/View.py	2007-03-18 15:01:53.000000000 +0100
+++ /tmp/fretsonfire/game/View.py	2007-08-18 16:20:33.000000000 +0200
@@ -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:
_______________________________________________
Pkg-games-devel mailing list
Pkg-games-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-devel

Reply via email to