Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ class WakelockPlusWindowsPlugin extends WakelockPlusPlatformInterface {
Future<void> toggle({required bool enable}) async {
final int response;
if (enable) {
response = SetThreadExecutionState(
EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_DISPLAY_REQUIRED);
response = SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
} else {
response = SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
response = SetThreadExecutionState(ES_CONTINUOUS);
}

// SetThreadExecutionState returns 0 if the operation failed.
Expand Down
Loading