Module: wine Branch: master Commit: 7a7dd5005c4d3b9c194e6266e735dd36720fde4d URL: https://source.winehq.org/git/wine.git/?a=commit;h=7a7dd5005c4d3b9c194e6266e...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 11 15:46:06 2018 +0200
shcore: Implement Get/SetProcessDpiAwareness().
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shcore/main.c | 9 ++++----- include/shellscalingapi.h | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 739e3ff..17d4b68 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -46,15 +46,14 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
HRESULT WINAPI GetProcessDpiAwareness(HANDLE process, PROCESS_DPI_AWARENESS *value) { - FIXME("(%p, %p): stub\n", process, value); - if (value) *value = PROCESS_DPI_UNAWARE; - return S_OK; + if (GetProcessDpiAwarenessInternal( process, (DPI_AWARENESS *)value )) return S_OK; + return HRESULT_FROM_WIN32( GetLastError() ); }
HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value) { - FIXME("(%u): stub\n", value); - return E_NOTIMPL; + if (SetProcessDpiAwarenessInternal( value )) return S_OK; + return HRESULT_FROM_WIN32( GetLastError() ); }
HRESULT WINAPI GetDpiForMonitor(HMONITOR monitor, MONITOR_DPI_TYPE type, UINT *x, UINT *y) diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h index fb49a30..1df85d5 100644 --- a/include/shellscalingapi.h +++ b/include/shellscalingapi.h @@ -34,4 +34,8 @@ typedef enum PROCESS_DPI_AWARENESS PROCESS_PER_MONITOR_DPI_AWARE } PROCESS_DPI_AWARENESS;
+HRESULT WINAPI GetDpiForMonitor(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*); +HRESULT WINAPI GetProcessDpiAwareness(HANDLE,PROCESS_DPI_AWARENESS*); +HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS); + #endif /* __WINE_SHELLSCALINGAPI_H */