main.cc: prevent system from sleeping on Windows

pull/2087/head
Paper 2023-09-02 00:23:29 -04:00 committed by GitHub
parent f4cbc7bb31
commit 463fae6c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -68,7 +68,11 @@ error_code::Value main(int argc, char** argv)
pargv[i] = winArgStrs.back().get();
}
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
Context context(true, winArgc, pargv.get(), KeyVals());
SetThreadExecutionState(ES_CONTINUOUS);
#else // !__MINGW32__
Context context(true, argc, argv, KeyVals());
#endif // !__MINGW32__