[PATCH v2 0/1] MR6802: user32: Add GetDpiAwarenessContextForProcess stub.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=57169 -- v2: user32: Implement GetDpiAwarenessContextForProcess. https://gitlab.winehq.org/wine/wine/-/merge_requests/6802
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=57169 --- dlls/user32/user32.spec | 2 +- dlls/user32/win.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index d5a5bc0706f..0dd93d9fe6c 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -558,7 +558,7 @@ @ stdcall GetDlgItemTextA(long long ptr long) @ stdcall GetDlgItemTextW(long long ptr long) @ stdcall GetDoubleClickTime() NtUserGetDoubleClickTime -# @ stub GetDpiAwarenessContextForProcess +@ stdcall GetDpiAwarenessContextForProcess(ptr) @ stdcall GetDpiForMonitorInternal(long long ptr ptr) NtUserGetDpiForMonitor @ stdcall GetDpiForSystem() @ stdcall GetDpiForWindow(long) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 7a552b48db4..b4d4e65ff95 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -615,6 +615,19 @@ DPI_AWARENESS_CONTEXT WINAPI GetWindowDpiAwarenessContext( HWND hwnd ) return LongToHandle( NtUserGetWindowDpiAwarenessContext( hwnd ) ); } +/*********************************************************************** + * GetDpiAwarenessContextForProcess (USER32.@) + */ +DPI_AWARENESS_CONTEXT WINAPI GetDpiAwarenessContextForProcess(HANDLE process) +{ + DPI_AWARENESS awareness; + + TRACE("(%p)\n", process); + + GetProcessDpiAwarenessInternal(process, &awareness); + + return LongToHandle(awareness); +} /*********************************************************************** * GetWindowDpiHostingBehavior (USER32.@) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6802
Rémi Bernon (@rbernon) commented about dlls/user32/win.c:
return LongToHandle( NtUserGetWindowDpiAwarenessContext( hwnd ) ); }
+/*********************************************************************** + * GetDpiAwarenessContextForProcess (USER32.@) + */ +DPI_AWARENESS_CONTEXT WINAPI GetDpiAwarenessContextForProcess(HANDLE process) +{ + DPI_AWARENESS awareness; + + TRACE("(%p)\n", process); + + GetProcessDpiAwarenessInternal(process, &awareness); + + return LongToHandle(awareness); +}
```suggestion:-9+0 DPI_AWARENESS_CONTEXT WINAPI GetDpiAwarenessContextForProcess( HANDLE process ) { return LongToHandle( NtUserGetProcessDpiAwarenessContext( process ) ); } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6802#note_87286
participants (3)
-
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes) -
Rémi Bernon