[PATCH] shcore: Add GetScaleFactorForDevice() stub.

Zebediah Figura zfigura at codeweavers.com
Wed Aug 26 12:22:40 CDT 2020


On 8/26/20 12:06 PM, Nikolay Sivov wrote:
> From: Derek Lesho <dlesho at codeweavers.com>
> 
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
>  dlls/shcore/main.c        | 7 +++++++
>  dlls/shcore/shcore.spec   | 2 +-
>  include/shellscalingapi.h | 7 +++++++
>  3 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
> index e552ba277f7..32649cccd9c 100644
> --- a/dlls/shcore/main.c
> +++ b/dlls/shcore/main.c
> @@ -86,6 +86,13 @@ HRESULT WINAPI GetScaleFactorForMonitor(HMONITOR monitor, DEVICE_SCALE_FACTOR *s
>      return S_OK;
>  }
>  
> +DEVICE_SCALE_FACTOR WINAPI GetScaleFactorForDevice(DISPLAY_DEVICE_TYPE device_type)
> +{
> +    FIXME("%d\n", device_type);
> +
> +    return SCALE_100_PERCENT;
> +}
> +
>  HRESULT WINAPI _IStream_Read(IStream *stream, void *dest, ULONG size)
>  {
>      ULONG read;
> diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
> index d5b7a342e31..368fab19541 100644
> --- a/dlls/shcore/shcore.spec
> +++ b/dlls/shcore/shcore.spec
> @@ -11,7 +11,7 @@
>  @ stub GetDpiForShellUIComponent
>  @ stdcall GetProcessDpiAwareness(long ptr)
>  @ stdcall GetProcessReference(ptr)
> -@ stub GetScaleFactorForDevice
> +@ stdcall GetScaleFactorForDevice(long)
>  @ stdcall GetScaleFactorForMonitor(long ptr)
>  @ stub IStream_Copy
>  @ stdcall IStream_Read(ptr ptr long) _IStream_Read
> diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h
> index 82a1daaa62b..0ca0c2432af 100644
> --- a/include/shellscalingapi.h
> +++ b/include/shellscalingapi.h
> @@ -36,8 +36,15 @@ typedef enum PROCESS_DPI_AWARENESS
>      PROCESS_PER_MONITOR_DPI_AWARE
>  } PROCESS_DPI_AWARENESS;
>  
> +typedef enum
> +{
> +    DEVICE_PRIMARY   = 0,
> +    DEVICE_IMMERSIVE = 1,
> +} DISPLAY_DEVICE_TYPE;
> +
>  HRESULT WINAPI GetDpiForMonitor(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);
>  HRESULT WINAPI GetProcessDpiAwareness(HANDLE,PROCESS_DPI_AWARENESS*);
> +DEVICE_SCALE_FACTOR WINAPI GetScaleFactoryForDevice(DISPLAY_DEVICE_TYPE device_type);

Spelling error here.

>  HRESULT WINAPI GetScaleFactorForMonitor(HMONITOR,DEVICE_SCALE_FACTOR*);
>  HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS);
>  
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200826/b759d192/attachment.sig>


More information about the wine-devel mailing list