Commit 676eb230 authored by Andriy Palamarchuk's avatar Andriy Palamarchuk Committed by Alexandre Julliard

Added SYSMETRICS_Set.

Implemented SPI_SETSHOWSOUNDS action.
parent 2718c895
......@@ -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 */
......
......@@ -260,6 +260,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)
*/
INT16 WINAPI GetSystemMetrics16( INT16 index )
......@@ -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];
}
......@@ -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 */
......
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