File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -979,6 +979,11 @@ void CClient::Start()
979979
980980 // start audio interface
981981 Sound.Start ();
982+
983+ #if defined( Q_OS_WINDOWS )
984+ // Disable hibernation or display dimming if the app is running on Windows
985+ SetThreadExecutionState ( ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED );
986+ #endif
982987}
983988
984989void CClient::Stop ()
@@ -1013,6 +1018,11 @@ void CClient::Stop()
10131018 // reset current signal level and LEDs
10141019 bJitterBufferOK = true ;
10151020 SignalLevelMeter.Reset ();
1021+
1022+ #if defined( Q_OS_WINDOWS )
1023+ // Allow hibernation or display dimming if the app is running again (Windows)
1024+ SetThreadExecutionState ( ES_CONTINUOUS );
1025+ #endif
10161026}
10171027
10181028void CClient::Init ()
You can’t perform that action at this time.
0 commit comments