Commit 0624e17e authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

Fix returned value for SPI_SETMOUSEBUTTONSWAP.

parent 9213d56a
......@@ -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 */
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment