diff --git a/include/sysmetrics.h b/include/sysmetrics.h index ad922d4b606..d582b3f83fc 100644 --- a/include/sysmetrics.h +++ b/include/sysmetrics.h @@ -8,6 +8,7 @@ #define __WINE_SYSMETRICS_H extern void SYSMETRICS_Init(void); /* sysmetrics.c */ +extern INT SYSMETRICS_Set( INT index, INT value ); /* sysmetrics.c */ extern void SYSCOLOR_Init(void); /* syscolor.c */ /* Wine extensions */ diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c index 6c274a169b0..c94ca3710d6 100644 --- a/windows/sysmetrics.c +++ b/windows/sysmetrics.c @@ -259,6 +259,23 @@ void SYSMETRICS_Init(void) } +/*********************************************************************** + * SYSMETRICS_Set + * + * Sets system metrics. + */ +INT SYSMETRICS_Set( INT index, INT value ) +{ + if ((index < 0) || (index > SM_WINE_CMETRICS)) return 0; + else + { + INT prev = sysMetrics[index]; + sysMetrics[index] = value; + return prev; + } +} + + /*********************************************************************** * GetSystemMetrics (USER.179) */ @@ -274,5 +291,5 @@ INT16 WINAPI GetSystemMetrics16( INT16 index ) INT WINAPI GetSystemMetrics( INT index ) { if ((index < 0) || (index > SM_WINE_CMETRICS)) return 0; - else return sysMetrics[index]; + return sysMetrics[index]; } diff --git a/windows/sysparams.c b/windows/sysparams.c index f39c8792508..3034d5d9aca 100644 --- a/windows/sysparams.c +++ b/windows/sysparams.c @@ -20,6 +20,7 @@ #include "keyboard.h" #include "user.h" #include "debugtools.h" +#include "sysmetrics.h" DEFAULT_DEBUG_CHANNEL(system); @@ -404,9 +405,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam, WINE_SPI_FIXME(SPI_GETMOUSEKEYS); /* 54 */ WINE_SPI_FIXME(SPI_SETMOUSEKEYS); /* 55 */ case SPI_GETSHOWSOUNDS: /* 56 */ - *(INT *)pvParam = GetSystemMetrics( SM_SHOWSOUNDS ); - break; - WINE_SPI_FIXME(SPI_SETSHOWSOUNDS); /* 57 */ + *(INT *)pvParam = GetSystemMetrics( SM_SHOWSOUNDS ); + break; + case SPI_SETSHOWSOUNDS: /* 57 */ + SYSMETRICS_Set(SM_SHOWSOUNDS, uiParam); + break; WINE_SPI_FIXME(SPI_GETSTICKYKEYS); /* 58 */ WINE_SPI_FIXME(SPI_SETSTICKYKEYS); /* 59 */ WINE_SPI_FIXME(SPI_GETACCESSTIMEOUT); /* 60 */