Skip to content

Commit 103c818

Browse files
committed
[POWRPROF] Use the IS_PWR_* macros (reactos#8386)
1 parent ae4c5b9 commit 103c818

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dll/win32/powrprof/powrprof.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ IsPwrHibernateAllowed(VOID)
462462
return FALSE;
463463
}
464464

465-
return PowerCaps.SystemS4 && PowerCaps.HiberFilePresent; // IsHiberfilPresent();
465+
return IS_PWR_HIBERNATE_ALLOWED(&PowerCaps);
466466
}
467467

468468
BOOLEAN WINAPI
@@ -481,7 +481,7 @@ IsPwrShutdownAllowed(VOID)
481481
return FALSE;
482482
}
483483

484-
return PowerCaps.SystemS5;
484+
return IS_PWR_POWEROFF_ALLOWED(&PowerCaps);
485485
}
486486

487487
BOOLEAN WINAPI
@@ -500,7 +500,9 @@ IsPwrSuspendAllowed(VOID)
500500
return FALSE;
501501
}
502502

503-
return PowerCaps.SystemS1 || PowerCaps.SystemS2 || PowerCaps.SystemS3;
503+
// NOTE for possible future wine-syncs: wine erroneously use '&&'
504+
// instead of: PowerCaps.SystemS1 || PowerCaps.SystemS2 || PowerCaps.SystemS3;
505+
return IS_PWR_SUSPEND_ALLOWED(&PowerCaps);
504506
}
505507

506508
DWORD WINAPI

0 commit comments

Comments
 (0)