From e352b29d12a72e9a616d71b7a504e939c307f1c1 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 11 Apr 2017 14:08:53 +0100 Subject: [PATCH] user32/tests: Fix tests for minimium icon spacing when not in DPI scaling mode. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/user32/tests/sysparams.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 055060e4378..96b15814d7b 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -884,7 +884,7 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val) { BOOL rc; - INT spacing, regval; + INT spacing, regval, min_val = MulDiv( 32, dpi, USER_DEFAULT_SCREEN_DPI ); ICONMETRICSA im; rc=SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, curr_val, 0, @@ -892,7 +892,7 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val) if (!test_error_msg(rc,"SPI_ICONHORIZONTALSPACING")) return FALSE; ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); test_change_message( SPI_ICONHORIZONTALSPACING, 0 ); - if( curr_val < 32) curr_val = 32; + curr_val = max( curr_val, min_val ); /* The registry keys depend on the Windows version and the values too * let's test (works on win95,ME,NT4,2k,XP) */ @@ -1053,7 +1053,7 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */ static BOOL dotest_spi_iconverticalspacing( INT curr_val) { BOOL rc; - INT spacing, regval; + INT spacing, regval, min_val = MulDiv( 32, dpi, USER_DEFAULT_SCREEN_DPI ); ICONMETRICSA im; rc=SystemParametersInfoA( SPI_ICONVERTICALSPACING, curr_val, 0, @@ -1061,7 +1061,7 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val) if (!test_error_msg(rc,"SPI_ICONVERTICALSPACING")) return FALSE; ok(rc, "SystemParametersInfoA: rc=%d err=%d\n", rc, GetLastError()); test_change_message( SPI_ICONVERTICALSPACING, 0 ); - if( curr_val < 32) curr_val = 32; + curr_val = max( curr_val, min_val ); /* The registry keys depend on the Windows version and the values too * let's test (works on win95,ME,NT4,2k,XP) */