user32: Change IsProcessDPIAware() to always return TRUE.

This mimics Windows' behaviour when the 'Use Windows XP style DPI
scaling' box is ticked.  Since we don't have a DPI scaler, this makes
most sense.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2017-05-02 16:12:39 +01:00 committed by Alexandre Julliard
parent 3d47809aca
commit ee3f060262
2 changed files with 25 additions and 5 deletions

View File

@ -2910,10 +2910,9 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
/***********************************************************************
* SetProcessDPIAware (USER32.@)
*/
BOOL WINAPI SetProcessDPIAware( VOID )
BOOL WINAPI SetProcessDPIAware(void)
{
FIXME( "stub!\n");
TRACE("\n");
return TRUE;
}
@ -2922,8 +2921,8 @@ BOOL WINAPI SetProcessDPIAware( VOID )
*/
BOOL WINAPI IsProcessDPIAware(void)
{
FIXME( "stub!\n");
return FALSE;
TRACE("returning TRUE\n");
return TRUE;
}
/**********************************************************************

View File

@ -2976,6 +2976,26 @@ static void test_GetSysColorBrush(void)
win_skip("COLOR_MENUBAR unsupported\n");
}
static void test_dpi_aware(void)
{
BOOL ret;
if (!pIsProcessDPIAware)
{
win_skip("IsProcessDPIAware not available\n");
return;
}
ret = pSetProcessDPIAware();
ok(ret, "got %d\n", ret);
ret = pIsProcessDPIAware();
ok(ret, "got %d\n", ret);
dpi = real_dpi;
test_GetSystemMetrics();
}
START_TEST(sysparams)
{
int argc;
@ -3040,4 +3060,5 @@ START_TEST(sysparams)
}
ReleaseDC( 0, hdc);
test_dpi_aware();
}