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

This commit is contained in:
Ken Thomases 2013-10-21 16:37:05 -05:00 committed by Alexandre Julliard
parent 231a31223c
commit 742c48b348
3 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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++)