Added SYSMETRICS_Set.

Implemented SPI_SETSHOWSOUNDS action.
This commit is contained in:
Andriy Palamarchuk 2001-10-02 18:35:32 +00:00 committed by Alexandre Julliard
parent 2718c895d1
commit 676eb230e1
3 changed files with 25 additions and 4 deletions

View File

@ -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 */

View File

@ -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];
}

View File

@ -20,6 +20,7 @@
#include "keyboard.h"
#include "user.h"
#include "debugtools.h"
#include "sysmetrics.h"
DEFAULT_DEBUG_CHANNEL(system);
@ -406,7 +407,9 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case SPI_GETSHOWSOUNDS: /* 56 */
*(INT *)pvParam = GetSystemMetrics( SM_SHOWSOUNDS );
break;
WINE_SPI_FIXME(SPI_SETSHOWSOUNDS); /* 57 */
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 */