winemac: Add registry setting to control glFlush() skipping for single-buffer contexts and disable it by default.
This commit is contained in:
parent
967a49fcb2
commit
b7c7d09470
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue