H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
203 stars 80 forks source link

[macOS] Uru should (optionally) hold a wakelock assertion #1600

Open dpogue opened 1 month ago

dpogue commented 1 month ago

Would be nice to have a "Prevent system from going to sleep" checkbox in the options while the game is running

Hoikas commented 1 month ago

IMO, no computer should go to sleep while Uru is runnng.

dpogue commented 1 month ago

This should be reasonably easy using IOPMAssertionCreateWithName with kIOPMAssertionTypePreventUserIdleSystemSleep