flathub / com.fightcade.Fightcade

https://flathub.org/apps/details/com.fightcade.Fightcade
Apache License 2.0
10 stars 4 forks source link

Inhibit screensaver for Wine #76

Open Pobega opened 2 years ago

Pobega commented 2 years ago

Fightcade (specifically fcade) currently makes no attempts to inhibit screensavers on Linux. Thankfully we are using ../Resources/wine.sh to launch wine which means we already have a convenient wine wrapper.

We should talk to org.freedesktop.ScreenSaver via dbus to attempt to inhibit the screensaver while wine is running.

Since Gnome 3.36 the dbus-send command cannot be used for this purpose since once the command exits the screensaver is reactivated. Instead, wine.sh should be modified to launch wine.py which wraps the wine subprocess call with a Gnome-screensaver inhibit.

https://people.freedesktop.org/~hadess/idle-inhibition-spec/re01.html https://gist.github.com/fxthomas/9bdfadd972eaf7100b374042faac28c2

Pobega commented 2 years ago

for Flycast native a feature request has been made: https://github.com/flyinghead/flycast/issues/398

This is no longer needed for Flycast now that we have --talk=org.freedesktop.ScreenSaver, it seems to just work (tested by running Flycast manually, not through Fightcade)