From e6f53a39bb3fb946c4aeba0e9cd83bd9c81c5481 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 20 May 2025 15:13:23 -0700 Subject: [PATCH] old windows dpi awareness paths --- src/os/gfx/win32/os_gfx_win32.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/os/gfx/win32/os_gfx_win32.c b/src/os/gfx/win32/os_gfx_win32.c index 8caf11fd..ee0b4412 100644 --- a/src/os/gfx/win32/os_gfx_win32.c +++ b/src/os/gfx/win32/os_gfx_win32.c @@ -831,6 +831,21 @@ os_gfx_init(void) { SetProcessDpiAwarenessContext_func(w32_DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); } + else + { + HMODULE shcore = LoadLibraryA("shcore.dll"); + if(shcore) + { + typedef HRESULT (WINAPI* SetProcessDpiAwareness_t)(int); + SetProcessDpiAwareness_t SetProcessDpiAwareness = (void*)GetProcAddress(shcore, "SetProcessDpiAwareness"); + if(SetProcessDpiAwareness) + { + SetProcessDpiAwareness(2); + } + FreeLibrary(shcore); + } + SetProcessDPIAware(); + } //- rjf: register graphical-window class {