[POWERCFG] Show the hibernate page only if the S4 power state is available

This commit is contained in:
Eric Kohl 2019-05-12 23:52:08 +02:00
parent c58a2163d7
commit a65a260919

View file

@ -130,7 +130,10 @@ Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
InitPropSheetPage(&psh, IDD_POWERSCHEMESPAGE_AC, PowerSchemesDlgProc);
}
InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, AdvancedDlgProc);
InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, HibernateDlgProc);
if (spc.SystemS4)
{
InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, HibernateDlgProc);
}
/* Load additional pages provided by shell extensions */
hpsxa = SHCreatePropSheetExtArray(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER TEXT("\\Power"), MAX_POWER_PAGES - psh.nPages);