summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-04-16 22:09:00 +0200
committerErik Faye-Lund <erik.faye-lund@collabora.com>2020-04-16 22:11:29 +0200
commitd24d852fc72b7b61fbae0599ab495cd2ae7bcfbe (patch)
tree452e8202ab5c78ddf4b1294cbca64ea44253521e
parent7fa3a4335154753973ee7f0d1efd5e40a93e454d (diff)
wglgears: set whole process as dpi-aware
It seems different GPU drivers behave differently in the case of per-thread DPI-awareness, causing incorrect rendering on drivers like the NVIDIA-driver. This is probably related to some internal threading in the drivers, and is probably a subtle driver-bug. In either case, setting per-process DPI awareness seems to do the trick. It doesn't matter to us if we're doing per process or per thread, so let's just go with the more robust solution. Fixes: 7fa3a433 ("wglgears: mark application as dpi-aware")
-rw-r--r--src/wgl/wglgears.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wgl/wglgears.c b/src/wgl/wglgears.c
index 0b7ea519..819c8ba9 100644
--- a/src/wgl/wglgears.c
+++ b/src/wgl/wglgears.c
@@ -382,7 +382,7 @@ make_window(const char *name, int x, int y, int width, int height)
};
#if WINVER >= 0x0605
- SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
+ SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
#endif
winrect.left = (long)0;