Ken Thomases : winemac: Disable software GL rendering unless it' s enabled via a new registry setting, AllowSoftwareRendering.

Alexandre Julliard julliard at winehq.org
Tue Oct 22 13:30:41 CDT 2013


Module: wine
Branch: master
Commit: 742c48b3489a21dd373221aa10bb648dd02c86d8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=742c48b3489a21dd373221aa10bb648dd02c86d8

Author: Ken Thomases <ken at codeweavers.com>
Date:   Mon Oct 21 16:37:05 2013 -0500

winemac: Disable software GL rendering unless it's enabled via a new registry setting, AllowSoftwareRendering.

---

 dlls/winemac.drv/macdrv.h      |    1 +
 dlls/winemac.drv/macdrv_main.c |    4 ++++
 dlls/winemac.drv/opengl.c      |    5 +++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h
index 98ecb90..362d5ea 100644
--- a/dlls/winemac.drv/macdrv.h
+++ b/dlls/winemac.drv/macdrv.h
@@ -38,6 +38,7 @@
 extern BOOL skip_single_buffer_flushes DECLSPEC_HIDDEN;
 extern BOOL allow_vsync DECLSPEC_HIDDEN;
 extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
+extern BOOL allow_software_rendering DECLSPEC_HIDDEN;
 extern HMODULE macdrv_module DECLSPEC_HIDDEN;
 
 
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c
index b86c8ae..df45bb5 100644
--- a/dlls/winemac.drv/macdrv_main.c
+++ b/dlls/winemac.drv/macdrv_main.c
@@ -52,6 +52,7 @@ BOOL allow_vsync = TRUE;
 BOOL allow_set_gamma = TRUE;
 int left_option_is_alt = 0;
 int right_option_is_alt = 0;
+BOOL allow_software_rendering = FALSE;
 HMODULE macdrv_module = 0;
 
 
@@ -176,6 +177,9 @@ static void setup_options(void)
     if (!get_config_key(hkey, appkey, "RightOptionIsAlt", buffer, sizeof(buffer)))
         right_option_is_alt = IS_OPTION_TRUE(buffer[0]);
 
+    if (!get_config_key(hkey, appkey, "AllowSoftwareRendering", buffer, sizeof(buffer)))
+        allow_software_rendering = IS_OPTION_TRUE(buffer[0]);
+
     if (appkey) RegCloseKey(appkey);
     if (hkey) RegCloseKey(hkey);
 }
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index 1ae2744..16b79df 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -619,6 +619,11 @@ static void enum_renderer_pixel_formats(renderer_properties renderer, CFMutableA
         attribs[n++] = kCGLPFAAccelerated;
         attribs[n++] = kCGLPFANoRecovery;
     }
+    else if (!allow_software_rendering)
+    {
+        TRACE("ignoring software renderer because AllowSoftwareRendering is off\n");
+        return;
+    }
 
     n_stack[++n_stack_idx] = n;
     for (double_buffer = 0; double_buffer <= 1; double_buffer++)




More information about the wine-cvs mailing list