From a89ac894ab99021a561ffbceacd5b59e3b824da9 Mon Sep 17 00:00:00 2001 From: Ivan Leo Puoti Date: Thu, 14 Oct 2004 03:06:41 +0000 Subject: [PATCH] Implement action 83 in SystemParametersInfo(). --- tools/wine.inf | 1 + windows/sysparams.c | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/tools/wine.inf b/tools/wine.inf index f077cb67828..813370ea3a4 100644 --- a/tools/wine.inf +++ b/tools/wine.inf @@ -118,6 +118,7 @@ HKCU,%Desktop%,"FontSmoothing",,"0" HKCU,%Desktop%,"DragFullWindows",,"0" HKCU,%Desktop%,"SmoothScroll",1,00,00,00,00 HKCU,%Desktop%,"UserPreferencemask",1,00,00,00,00 +HKCU,%Desktop%,"LowPowerActive",,"0" [DirectX] HKLM,Software\Microsoft\DirectX,"Version",,"4.09.00.0902" diff --git a/windows/sysparams.c b/windows/sysparams.c index 722cf5ec9de..5bf84fde971 100644 --- a/windows/sysparams.c +++ b/windows/sysparams.c @@ -138,6 +138,8 @@ static const WCHAR SPI_SETDESKWALLPAPER_REGKEY[]= {'C','o','n','t',' static const WCHAR SPI_SETDESKWALLPAPER_VALNAME[]= {'W','a','l','l','p','a','p','e','r',0}; static const WCHAR SPI_SETFONTSMOOTHING_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; static const WCHAR SPI_SETFONTSMOOTHING_VALNAME[]= {'F','o','n','t','S','m','o','o','t','h','i','n','g',0}; +static const WCHAR SPI_GETLOPOWERACTIVE_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; +static const WCHAR SPI_GETLOPOWERACTIVE_VALNAME[]= {'L','o','w','P','o','w','e','r','A','c','t','i','v','e',0}; static const WCHAR SPI_USERPREFERENCEMASK_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; static const WCHAR SPI_USERPREFERENCEMASK_VALNAME[]= {'U','s','e','r','P','r','e','f','e','r','e','n','c','e','m','a','s','k',0}; static const WCHAR SPI_SETLISTBOXSMOOTHSCROLLING_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; @@ -211,6 +213,7 @@ static int mouse_scroll_lines = 3; static int menu_show_delay = 400; static BOOL screensaver_running = FALSE; static BOOL font_smoothing = FALSE; +static BOOL lowpoweractive = FALSE; static BOOL keyboard_cues = FALSE; static BOOL gradient_captions = FALSE; static BOOL listbox_smoothscrolling = FALSE; @@ -1749,7 +1752,26 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, WINE_SPI_FIXME(SPI_GETPOWEROFFTIMEOUT); /* 80 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETLOWPOWERTIMEOUT); /* 81 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETPOWEROFFTIMEOUT); /* 82 WINVER >= 0x400 */ - WINE_SPI_FIXME(SPI_GETLOWPOWERACTIVE); /* 83 WINVER >= 0x400 */ + + case SPI_GETLOWPOWERACTIVE: /* 83 WINVER >= 0x400 */ + if (!pvParam) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!spi_loaded[SPI_GETLOWPOWERACTIVE]) + { + WCHAR buf[5]; + if(SYSPARAMS_Load(SPI_GETLOPOWERACTIVE_REGKEY, SPI_GETLOPOWERACTIVE_VALNAME, buf, sizeof(buf))) + { + spi_loaded[SPI_GETLOWPOWERACTIVE] = TRUE; + lowpoweractive = atoiW(buf); + } + else ret=FALSE; + } + *(BOOL *)pvParam = lowpoweractive; + break; + WINE_SPI_FIXME(SPI_GETPOWEROFFACTIVE); /* 84 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETLOWPOWERACTIVE); /* 85 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETPOWEROFFACTIVE); /* 86 WINVER >= 0x400 */ -- 2.11.4.GIT