wine-staging/patches/winemac.drv-no-flicker-patch/0001-winemac.drv-No-Flicker-patch.patch

62 lines
2.2 KiB
Diff
Raw Normal View History

From 2d72a65d874538ec1032adaf42a28940e6b6a375 Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Tue, 22 Jun 2021 07:56:43 +1000
Subject: [PATCH] winemac.drv: No Flicker patch
---
dlls/winemac.drv/macdrv.h | 1 +
dlls/winemac.drv/macdrv_main.c | 4 ++++
dlls/winemac.drv/opengl.c | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h
index f9ada39d38a..89ffa0d5825 100644
--- a/dlls/winemac.drv/macdrv.h
+++ b/dlls/winemac.drv/macdrv.h
@@ -43,6 +43,7 @@
extern BOOL allow_vsync;
extern BOOL allow_set_gamma;
extern BOOL allow_software_rendering;
+extern BOOL force_backing_store;
extern UINT64 app_icon_callback;
extern UINT64 app_quit_request_callback;
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c
index ea556aef68d..e67f17f9f43 100644
--- a/dlls/winemac.drv/macdrv_main.c
+++ b/dlls/winemac.drv/macdrv_main.c
@@ -59,6 +59,7 @@ int use_precise_scrolling = TRUE;
int gl_surface_mode = GL_SURFACE_IN_FRONT_OPAQUE;
int retina_enabled = FALSE;
int enable_app_nap = FALSE;
+BOOL force_backing_store = FALSE;
UINT64 app_icon_callback = 0;
UINT64 app_quit_request_callback = 0;
@@ -379,6 +380,9 @@ static void setup_options(void)
if (!get_config_key(hkey, appkey, "EnableAppNap", buffer, sizeof(buffer)))
enable_app_nap = IS_OPTION_TRUE(buffer[0]);
+ if (!get_config_key(hkey, appkey, "ForceOpenGLBackingStore", buffer, sizeof(buffer)))
+ force_backing_store = IS_OPTION_TRUE(buffer[0]);
+
/* Don't use appkey. The DPI and monitor sizes should be consistent for all
processes in the prefix. */
if (!get_config_key(hkey, NULL, "RetinaMode", buffer, sizeof(buffer)))
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index ac87cfc1313..68de39f49cd 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -1451,7 +1451,7 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
attribs[n++] = pf->samples;
}
- if (pf->backing_store)
+ if (force_backing_store || pf->backing_store)
attribs[n++] = kCGLPFABackingStore;
if (core)
--
2.45.2