shcore: Implement semi-stub for GetDpiForMonitor.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2018-01-24 01:19:04 -07:00 committed by Alexandre Julliard
parent 225f8bea79
commit 4a4bf34f06
4 changed files with 19 additions and 2 deletions

View File

@ -1,4 +1,4 @@
@ stub GetDpiForMonitor
@ stdcall GetDpiForMonitor(long long ptr ptr) shcore.GetDpiForMonitor
@ stdcall GetProcessDpiAwareness(long ptr) shcore.GetProcessDpiAwareness
@ stub GetScaleFactorForDevice
@ stub GetScaleFactorForMonitor

View File

@ -1,4 +1,5 @@
MODULE = shcore.dll
IMPORTS = user32 gdi32
C_SRCS = \
main.c

View File

@ -21,6 +21,8 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "shellscalingapi.h"
#include "wine/debug.h"
@ -48,3 +50,17 @@ HRESULT WINAPI GetProcessDpiAwareness(HANDLE process, PROCESS_DPI_AWARENESS *val
if (value) *value = PROCESS_DPI_UNAWARE;
return S_OK;
}
HRESULT WINAPI GetDpiForMonitor(HMONITOR monitor, MONITOR_DPI_TYPE type, UINT *x, UINT *y)
{
HDC hDC;
FIXME("(%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;
}

View File

@ -7,7 +7,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
@ stdcall GetProcessDpiAwareness(long ptr)
@ stub GetProcessReference