Fix returned value for SPI_SETMOUSEBUTTONSWAP.

This commit is contained in:
Vitaly Lipatov 2005-06-20 15:36:17 +00:00 committed by Alexandre Julliard
parent 9213d56ae0
commit 0624e17e7e
2 changed files with 6 additions and 6 deletions

View File

@ -1522,18 +1522,18 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
{
WCHAR buf[5];
spi_idx = SPI_SETMOUSEBUTTONSWAP_IDX;
wsprintfW(buf, CSu, uiParam);
/* MSDN says it returns previous state of swapbutton always */
ret = sysMetrics[SM_SWAPBUTTON];
if (SYSPARAMS_Save( SPI_SETMOUSEBUTTONSWAP_REGKEY,
SPI_SETMOUSEBUTTONSWAP_VALNAME,
buf, fWinIni ))
{
sysMetrics[SM_SWAPBUTTON] = uiParam;
spi_loaded[spi_idx] = TRUE;
SYSPARAMS_NotifyChange( uiAction, fWinIni );
}
else
ret = FALSE;
break;
return ret;
}
WINE_SPI_FIXME(SPI_SETICONTITLELOGFONT); /* 34 */

View File

@ -1010,7 +1010,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
SetLastError(0xdeadbeef);
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_{GET,SET}MOUSEBUTTONSWAP"))
if (!test_error_msg(rc!=vals[i],"SPI_{GET,SET}MOUSEBUTTONSWAP"))
return;
test_change_message( SPI_SETMOUSEBUTTONSWAP, 0 );
@ -1023,7 +1023,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, old_b, 0,
SPIF_UPDATEINIFILE );
ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
ok(!rc,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
}
static void test_SPI_SETFASTTASKSWITCH( void ) /* 36 */