partial bugfix: [#36501] Blenderplayer can not change video resolution in Mac OSX
authorDalai Felinto <dfelinto@gmail.com>
Mon, 16 Sep 2013 13:24:28 +0000 (13:24 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 16 Sep 2013 13:24:28 +0000 (13:24 +0000)
OSX support for native desktop resolution changing is not simple as for Windows or Linux.

The 'fix' here is at the interface level only.
Refer to the original bug report for the suggested native workaround, test patch and problems.

release/scripts/startup/bl_ui/properties_game.py

index 025d86204f21d3d30d272a2fdfca8f6aae9ad75f..3470c9577af561300e128351e5527172d0251329 100644 (file)
@@ -290,7 +290,9 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
+        import sys
         layout = self.layout
+        not_osx = sys.platform != "darwin"
 
         gs = context.scene.game_settings
 
@@ -301,14 +303,17 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel):
         row = layout.row()
         row.label(text="Resolution:")
         row = layout.row(align=True)
+        row.active = not_osx or not gs.show_fullscreen
         row.prop(gs, "resolution_x", slider=False, text="X")
         row.prop(gs, "resolution_y", slider=False, text="Y")
         row = layout.row()
         col = row.column()
         col.prop(gs, "show_fullscreen")
-        col = row.column()
-        col.prop(gs, "use_desktop")
-        col.active = gs.show_fullscreen
+
+        if not_osx:
+            col = row.column()
+            col.prop(gs, "use_desktop")
+            col.active = gs.show_fullscreen
 
         col = layout.column()
         col.label(text="Quality:")