[POWERCFG] Show the hibernate page only if the S4 power state is available
authorEric Kohl <eric.kohl@reactos.org>
Sun, 12 May 2019 21:52:08 +0000 (23:52 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 12 May 2019 21:52:08 +0000 (23:52 +0200)
dll/cpl/powercfg/powercfg.c

index 14f2e9a..f9c7b9f 100644 (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);