Module: wine Branch: master Commit: cbcf609108b1e6de53e83c7f066ff4a04c6c48b3 URL: https://gitlab.winehq.org/wine/wine/-/commit/cbcf609108b1e6de53e83c7f066ff4a...
Author: Fabian Maurer dark.shadow4@web.de Date: Sat Feb 24 17:53:29 2024 +0100
win32u: Refactor get_thread_dpi_awareness to use get_awareness_from_dpi_awareness_context.
---
dlls/win32u/sysparams.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 5e48a09522c..7dc807bb909 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2216,24 +2216,10 @@ DPI_AWARENESS get_thread_dpi_awareness(void) struct ntuser_thread_info *info = NtUserGetThreadInfo(); ULONG_PTR context = info->dpi_awareness;
- switch (context) - { - case 0: /* process default */ + if (context == 0) /* process default */ return NtUserGetProcessDpiAwarenessContext( NULL ) & 3; - case 0x10: - case 0x11: - case 0x12: - case 0x80000010: - case 0x80000011: - case 0x80000012: - return 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 ~context; - default: - return DPI_AWARENESS_INVALID; - } + + return get_awareness_from_dpi_awareness_context((DPI_AWARENESS_CONTEXT)context); }
DWORD get_process_layout(void)