You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Generals/Code/GameEngine/Include/GameLogic/GameLogic.h
+18-1
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,10 @@
39
39
#include"GameNetwork/NetworkDefs.h"
40
40
#include"Common/STLTypedefs.h"
41
41
#include"GameLogic/Module/UpdateModule.h"// needed for DIRECT_UPDATEMODULE_ACCESS
42
+
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
43
+
#ifdef _WIN32
44
+
#include<WinBase.h>
45
+
#endif
42
46
43
47
/*
44
48
At one time, we distinguished between sleepy and nonsleepy
inlinevoidGameLogic::setGameMode( Int mode ) { m_gameMode = mode; }
383
+
384
+
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
3661
+
#ifdef _WIN32
3662
+
SetThreadExecutionState(ES_CONTINUOUS);
3663
+
#endif
3664
+
3665
+
3660
3666
// remember the state of the mouse/input so we can return to the same state once we "unpause"
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
4212
+
#ifdef _WIN32
4213
+
SetThreadExecutionState(ES_CONTINUOUS);
4214
+
#endif
4215
+
4216
+
4211
4217
// remember the state of the mouse/input so we can return to the same state once we "unpause"
// TheSuperHackers @bugfix @ShizCalev 04/03/2025 - Prevents monitors from going to sleep during long periods of inactivity while the game is running - pr #281
0 commit comments