mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
[POWERCFG] Fix minor power scheme issues
- Really fix the exception that occurs on closing the property sheet. - Use the correct scheme ID when the current power scheme is set.
This commit is contained in:
parent
f79ca12eda
commit
93b54d007f
|
@ -162,9 +162,12 @@ DestroySchemesList(
|
|||
PLIST_ENTRY ListEntry;
|
||||
PPOWER_SCHEME pScheme;
|
||||
|
||||
while (!IsListEmpty(&pPageData->PowerSchemesList))
|
||||
for (;;)
|
||||
{
|
||||
ListEntry = pPageData->PowerSchemesList.Flink;
|
||||
if (ListEntry == &pPageData->PowerSchemesList)
|
||||
break;
|
||||
|
||||
pScheme = CONTAINING_RECORD(ListEntry, POWER_SCHEME, ListEntry);
|
||||
DeletePowerScheme(pScheme);
|
||||
}
|
||||
|
@ -560,7 +563,7 @@ Pos_SaveData(HWND hwndDlg)
|
|||
pScheme->PowerPolicy.mach.DozeS4TimeoutDc = Sec[tmp];
|
||||
}
|
||||
|
||||
SetActivePwrScheme(iCurSel, NULL, &pScheme->PowerPolicy);
|
||||
SetActivePwrScheme(pScheme->uId, NULL, &pScheme->PowerPolicy);
|
||||
LoadConfig(hwndDlg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue