etfdevs / ETe

Improved Wolfenstein: Enemy Territory Engine
GNU General Public License v3.0
57 stars 17 forks source link

Allow enabling screensaver when game is running #86

Closed Aciz closed 11 months ago

Aciz commented 11 months ago

SDL by default blocks screensaver/DPMS from running, this allows overriding that via cvar so monitor(s) can sleep while the game is running. vid_restart isn't enough to toggle it unfortunately since SDL hints work in funny ways.

Aciz commented 11 months ago

Added non-SDL support too (for Windows) with r_allowScreenSaver, works on the fly without even requiring a vid_restart. The cvar is Windows only since it interacts with the Win32 API and doesn't work in the event someone would build on other platforms without SDL2.