mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to implement semi-stub for shcore.GetDpiForMonitor.
This commit is contained in:
parent
cf5a12527f
commit
8d7e0791fe
@ -0,0 +1,86 @@
|
||||
From 0effbe0e3eeb84626ec6b64848fe6cfb1279dc02 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 26 Jan 2016 15:39:10 +0100
|
||||
Subject: shcore: Implement stub for GetDpiForMonitor.
|
||||
|
||||
---
|
||||
dlls/shcore/Makefile.in | 1 +
|
||||
dlls/shcore/main.c | 16 ++++++++++++++++
|
||||
dlls/shcore/shcore.spec | 2 +-
|
||||
include/shellscalingapi.h | 8 ++++++++
|
||||
4 files changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
|
||||
index ec2e95f..0b172fc 100644
|
||||
--- a/dlls/shcore/Makefile.in
|
||||
+++ b/dlls/shcore/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULE = shcore.dll
|
||||
+IMPORTS = gdi32 user32
|
||||
|
||||
C_SRCS = \
|
||||
main.c
|
||||
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
|
||||
index 0e59d38..ce0d9ed 100644
|
||||
--- a/dlls/shcore/main.c
|
||||
+++ b/dlls/shcore/main.c
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+#include "wingdi.h"
|
||||
+#include "winuser.h"
|
||||
#include "shellscalingapi.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -47,3 +49,17 @@ HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
|
||||
FIXME("(%u): stub\n", value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
+
|
||||
+HRESULT WINAPI GetDpiForMonitor(HMONITOR monitor, MONITOR_DPI_TYPE type, UINT *x, UINT *y)
|
||||
+{
|
||||
+ HDC hDC;
|
||||
+
|
||||
+ TRACE("(%p, %u, %p, %p): semi-stub\n", monitor, type, x, y);
|
||||
+
|
||||
+ hDC = GetDC(0);
|
||||
+ if (x) *x = GetDeviceCaps(hDC, LOGPIXELSX);
|
||||
+ if (y) *y = GetDeviceCaps(hDC, LOGPIXELSY);
|
||||
+ ReleaseDC(0, hDC);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
|
||||
index 1624319..4d6e845 100644
|
||||
--- a/dlls/shcore/shcore.spec
|
||||
+++ b/dlls/shcore/shcore.spec
|
||||
@@ -6,7 +6,7 @@
|
||||
@ stub DllGetActivationFactory
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr) shell32.DllGetClassObject
|
||||
@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID
|
||||
-@ stub GetDpiForMonitor
|
||||
+@ stdcall GetDpiForMonitor(long long ptr ptr)
|
||||
@ stub GetDpiForShellUIComponent
|
||||
@ stub GetProcessDpiAwareness
|
||||
@ stub GetProcessReference
|
||||
diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h
|
||||
index 6d7a167..56ae94a 100644
|
||||
--- a/include/shellscalingapi.h
|
||||
+++ b/include/shellscalingapi.h
|
||||
@@ -26,4 +26,12 @@ typedef enum PROCESS_DPI_AWARENESS
|
||||
PROCESS_PER_MONITOR_DPI_AWARE = 2,
|
||||
} PROCESS_DPI_AWARENESS;
|
||||
|
||||
+typedef enum MONITOR_DPI_TYPE
|
||||
+{
|
||||
+ MDT_EFFECTIVE_DPI = 0,
|
||||
+ MDT_ANGULAR_DPI = 1,
|
||||
+ MDT_RAW_DPI = 2,
|
||||
+ MDT_DEFAULT = MDT_EFFECTIVE_DPI,
|
||||
+} MONITOR_DPI_TYPE;
|
||||
+
|
||||
#endif /* __WINE_SHELLSCALINGAPI_H */
|
||||
--
|
||||
2.6.4
|
||||
|
@ -2648,6 +2648,7 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
patch_apply api-ms-win-Stub_DLLs/0029-ext-ms-win-rtcore-ntuser-sysparams-l1-1-0-Add-dll.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0030-ext-ms-win-kernel32-package-current-l1-1-0-Add-dll.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0031-shcore-Add-SetProcessDpiAwareness-stub.patch
|
||||
patch_apply api-ms-win-Stub_DLLs/0032-shcore-Implement-stub-for-GetDpiForMonitor.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "api-ms-win-core-com-l1-1-1: Add dll.", 1 },';
|
||||
echo '+ { "Michael Müller", "kernelbase: Add dll and add stub for QuirkIsEnabled.", 1 },';
|
||||
@ -2680,6 +2681,7 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
echo '+ { "Michael Müller", "ext-ms-win-rtcore-ntuser-sysparams-l1-1-0: Add dll.", 1 },';
|
||||
echo '+ { "Michael Müller", "ext-ms-win-kernel32-package-current-l1-1-0: Add dll.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "shcore: Add SetProcessDpiAwareness stub.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "shcore: Implement stub for GetDpiForMonitor.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user