FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.76k stars 185 forks source link

joystick-aware screen waker #94

Closed NRG-R9T closed 5 years ago

NRG-R9T commented 5 years ago

Is your feature request related to a problem? Please describe. Game controller input is unsupported by the most common linux display servers and screensavers. When the screen saver is turned on in system settings (Kubuntu 18.04 LTS) and playing with a joystick (Xbox360 Wireless Controller), the screen saver interrupts the fun.

Describe the solution you'd like Unless a game takes special steps to see Game controllers as an input, we need a joystick-aware screen waker until the display servers catch up.

Describe alternatives you've considered The utility Joystickwake helps linux gamers who are tired of their screen saver interrupting their fun. The source code and documentation are on github: https://github.com/foresto/joystickwake

Additional context I use it and it works, maybe not perfect as sometimes the screen can go black for a second, when the sleep/wake happens in Project Cars 2, but it's still better than facing dead screen or a login screen in the heat of an 30min online race, running with 300km/h onto the breaking zone before hitting a wall and destroy the car. Maybe the existing Joystickwake utility could be integrated, forked or re-done/optimized for Gamemode?

mdiluz commented 5 years ago

Given during "GameMode" we likely wouldn't even want the screensaver in the first place, regardless of using a joystick or not, perhaps it'd meet your needs to just disable and/or enable it similar to SDL_DisableScreenSaver during GameMode?

NRG-R9T commented 5 years ago

Given during "GameMode" we likely wouldn't even want the screensaver in the first place, regardless of using a joystick or not, perhaps it'd meet your needs to just disable and/or enable it similar to SDL_DisableScreenSaver during GameMode?

Yes, absolutely. That would be much better. ;)

mdiluz commented 5 years ago

See above, hope that works for you :)

aejsmith commented 5 years ago

That PR has been merged, please let us know whether it works and if so I'll close this.

NRG-R9T commented 5 years ago

It works, you are the best, thank you! :)