Win32 platform: add support of "PROCESS_PER_MONITOR_DPI_AWARE" set via manifest.

This commit is contained in:
ManoloFLTK
2021-12-11 16:39:11 +01:00
parent 20f7db27ba
commit 12d699a650
+1
View File
@@ -561,6 +561,7 @@ void Fl_WinAPI_Screen_Driver::open_display_platform() {
if (!fl_GetProcessDpiAwareness || fl_GetProcessDpiAwareness(NULL, &awareness) != S_OK) {
awareness = 0; //corresponds to PROCESS_DPI_UNAWARE;
}
if (awareness == 2 /*PROCESS_PER_MONITOR_DPI_AWARE*/) is_dpi_aware = true;
if (awareness == 0 /*PROCESS_DPI_UNAWARE*/) { // DpiAwareness has not been set via a manifest
typedef void *fl_DPI_AWARENESS_CONTEXT;
typedef BOOL(WINAPI * SetProcessDpiAwarenessContext_type)(fl_DPI_AWARENESS_CONTEXT);