Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48016 Signed-off-by: Esdras Tarsis esdrastarsis@gmail.com --- v2: Fix fixme concatenation for monitor and return of GetScaleFactorForMonitor function. --- dlls/shcore/main.c | 9 +++++++++ dlls/shcore/shcore.spec | 2 +- include/shellscalingapi.h | 22 ++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 6a6247930f..d8d6d4f8e2 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -1517,6 +1517,15 @@ void WINAPI SetProcessReference(IUnknown *obj) process_ref = obj; }
+/************************************************************************* + * GetScaleFactorForMonitor [SHCORE.@] + */ +HRESULT WINAPI GetScaleFactorForMonitor(HMONITOR monitor, DEVICE_SCALE_FACTOR *scale) +{ + FIXME("(%p, %p) - stub!\n", monitor, scale); + return SCALE_100_PERCENT; +} + struct thread_data { LPTHREAD_START_ROUTINE thread_proc; diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index 6a634bdee5..d5b7a342e3 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -12,7 +12,7 @@ @ stdcall GetProcessDpiAwareness(long ptr) @ stdcall GetProcessReference(ptr) @ stub GetScaleFactorForDevice -@ stub GetScaleFactorForMonitor +@ stdcall GetScaleFactorForMonitor(long ptr) @ stub IStream_Copy @ stdcall IStream_Read(ptr ptr long) _IStream_Read @ stub IStream_ReadStr diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h index 1df85d5982..80dab0178f 100644 --- a/include/shellscalingapi.h +++ b/include/shellscalingapi.h @@ -34,8 +34,30 @@ typedef enum PROCESS_DPI_AWARENESS PROCESS_PER_MONITOR_DPI_AWARE } PROCESS_DPI_AWARENESS;
+typedef enum DEVICE_SCALE_FACTOR +{ + DEVICE_SCALE_FACTOR_INVALID, + SCALE_100_PERCENT, + SCALE_120_PERCENT, + SCALE_125_PERCENT, + SCALE_140_PERCENT, + SCALE_150_PERCENT, + SCALE_160_PERCENT, + SCALE_175_PERCENT, + SCALE_180_PERCENT, + SCALE_200_PERCENT, + SCALE_225_PERCENT, + SCALE_250_PERCENT, + SCALE_300_PERCENT, + SCALE_350_PERCENT, + SCALE_400_PERCENT, + SCALE_450_PERCENT, + SCALE_500_PERCENT +} DEVICE_SCALE_FACTOR; + HRESULT WINAPI GetDpiForMonitor(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*); HRESULT WINAPI GetProcessDpiAwareness(HANDLE,PROCESS_DPI_AWARENESS*); HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS); +HRESULT WINAPI GetScaleFactorForMonitor(HMONITOR,DEVICE_SCALE_FACTOR*);
#endif /* __WINE_SHELLSCALINGAPI_H */
Esdras Tarsis esdrastarsis@gmail.com wrote:
+HRESULT WINAPI GetScaleFactorForMonitor(HMONITOR monitor, DEVICE_SCALE_FACTOR *scale) +{
- FIXME("(%p, %p) - stub!\n", monitor, scale);
- return SCALE_100_PERCENT;
+}
This can't work.