diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 5dcf42ff7f5..5e48a09522c 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2187,6 +2187,27 @@ UINT get_win_monitor_dpi( HWND hwnd ) return system_dpi; } +/* see GetAwarenessFromDpiAwarenessContext */ +static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CONTEXT context ) +{ + switch ((ULONG_PTR)context) + { + case 0x10: + case 0x11: + case 0x12: + case 0x80000010: + case 0x80000011: + case 0x80000012: + return (ULONG_PTR)context & 3; + case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE: + case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE: + case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE: + return ~(ULONG_PTR)context; + default: + return DPI_AWARENESS_INVALID; + } +} + /********************************************************************** * get_thread_dpi_awareness */ @@ -2240,27 +2261,6 @@ UINT get_system_dpi(void) return system_dpi; } -/* see GetAwarenessFromDpiAwarenessContext */ -static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CONTEXT context ) -{ - switch ((ULONG_PTR)context) - { - case 0x10: - case 0x11: - case 0x12: - case 0x80000010: - case 0x80000011: - case 0x80000012: - return (ULONG_PTR)context & 3; - case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE: - case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE: - case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE: - return ~(ULONG_PTR)context; - default: - return DPI_AWARENESS_INVALID; - } -} - /********************************************************************** * SetThreadDpiAwarenessContext (win32u.so) */