mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Prevent Windows From Going to Sleep While In Train Mode
Fixes #2324 [skip travis]
This commit is contained in:
committed by
Ale Martinez
parent
4c62c52fc3
commit
d2a530e19e
@@ -1578,6 +1578,11 @@ void TrainSidebar::guiUpdate() // refreshes the telemetry
|
||||
CFStringRef reasonForActivity = CFSTR("TrainSidebar::guiUpdate");
|
||||
IOPMAssertionID assertionID;
|
||||
IOReturn suspendSreensaverSuccess = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
|
||||
|
||||
#elif defined(WIN32)
|
||||
// Multimedia applications, such as video players and presentation applications, must use ES_DISPLAY_REQUIRED
|
||||
// when they display video for long periods of time without user input.
|
||||
SetThreadExecutionState(ES_DISPLAY_REQUIRED);
|
||||
#endif
|
||||
|
||||
if(calibrating) {
|
||||
|
||||
Reference in New Issue
Block a user