Browse Source

fix for aspect ratio

Zachary Pavlov 18 years ago
parent
commit
e0d08e45d9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showbase/ShowBase.py

+ 3 - 0
direct/src/showbase/ShowBase.py

@@ -963,6 +963,9 @@ class ShowBase(DirectObject.DirectObject):
             win = self.win
 
         if win != None and win.hasSize():
+            if(win.getYSize() == 0 or win.getXSize() == 0):
+                #flub the aspect since we can't actually see anything
+                return 1
             aspectRatio = float(win.getXSize()) / float(win.getYSize())
 
         else: