team-eternity / eternity

The Eternity Engine
http://eternity.youfailit.net/wiki/Main_Page
GNU General Public License v3.0
230 stars 36 forks source link

Suspend execution when Eternity is off screen #597

Open ioan-chera opened 1 year ago

ioan-chera commented 1 year ago

Eternity should pause running everything unnecessary when off screen (minimized, behind other windows or on another virtual desktop). This is very important when playing it from a battery powered laptop and in some cases, if the laptop is silent and efficient, it's easy to forget. Right now it still runs rendering even if unnecessary, in situations such as the game being paused.

ioan-chera commented 1 year ago

So far, disabled D_Display when window is fully occluded (without necessarily being minimized). But only on some systems

May also need to think about disabling sounds, autopausing etc. (sometimes we don't want to autopause, such as when playing or especially testing demo).