Commit b7c7d094 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Add registry setting to control glFlush() skipping for single-buffer…

winemac: Add registry setting to control glFlush() skipping for single-buffer contexts and disable it by default.
parent 967a49fc
......@@ -35,6 +35,9 @@
#include "wine/gdi_driver.h"
extern BOOL skip_single_buffer_flushes DECLSPEC_HIDDEN;
extern const char* debugstr_cf(CFTypeRef t) DECLSPEC_HIDDEN;
static inline CGRect cgrect_from_rect(RECT rect)
......
......@@ -47,6 +47,7 @@ DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
int topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN;
int capture_displays_for_fullscreen = 0;
BOOL skip_single_buffer_flushes = FALSE;
/**************************************************************************
......@@ -156,6 +157,9 @@ static void setup_options(void)
if (!get_config_key(hkey, appkey, "CaptureDisplaysForFullscreen", buffer, sizeof(buffer)))
capture_displays_for_fullscreen = IS_OPTION_TRUE(buffer[0]);
if (!get_config_key(hkey, appkey, "SkipSingleBufferFlushes", buffer, sizeof(buffer)))
skip_single_buffer_flushes = IS_OPTION_TRUE(buffer[0]);
if (appkey) RegCloseKey(appkey);
if (hkey) RegCloseKey(hkey);
}
......
......@@ -3051,9 +3051,10 @@ static BOOL init_opengl(void)
#define REDIRECT(func) \
do { p##func = opengl_funcs.gl.p_##func; opengl_funcs.gl.p_##func = macdrv_##func; } while(0)
REDIRECT(glCopyPixels);
REDIRECT(glFlush);
REDIRECT(glReadPixels);
REDIRECT(glViewport);
if (skip_single_buffer_flushes)
REDIRECT(glFlush);
#undef REDIRECT
/* redirect some OpenGL extension functions */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment