ya2 · news · projects · code · about

fixed version
[pmachines.git] / game / app.py
index 88c9216359916195b82ddd0ec841b876d9fac9e7..057a6808f94f0bf9edc929c87d255c2c78cd87c4 100755 (executable)
@@ -198,12 +198,14 @@ class PmachinesApp:
         if res:
             res = LVector2i(*[int(_res) for _res in res.split('x')])
         else:
-            d_i = base.pipe.get_display_information()
-            def _res(idx):
-                return d_i.get_display_mode_width(idx), \
-                    d_i.get_display_mode_height(idx)
-            resolutions = [
-                _res(idx) for idx in range(d_i.get_total_display_modes())]
+            resolutions = []
+            if not self.version:
+                d_i = base.pipe.get_display_information()
+                def _res(idx):
+                    return d_i.get_display_mode_width(idx), \
+                        d_i.get_display_mode_height(idx)
+                resolutions = [
+                    _res(idx) for idx in range(d_i.get_total_display_modes())]
             res = sorted(resolutions)[-1]
         fullscreen = self._options['settings']['fullscreen']
         props = WindowProperties()