identify the game by its name in SDL#1503
Conversation
The SDL used in the CI (and then in possible users's computer) is probably too old, we may |
|
Or just write the string literal for SDL_HINT_APP_NAME instead of using the macro |
74b37c8 to
2692589
Compare
|
So now I check for SDL 2.0.22 as that is where this feature was introduced. Also made sure I don't try to reference SDL in the TTY build, oops. I've left some comments explaining what this does and why the version is checked. |
|
Might that fix Unvanquished/Unvanquished#1384 ? |
2692589 to
c90bb13
Compare
No, I rather suspect this is a different problem. |
|
LGTM
Maybe if SDL is < 2.022 it does not set anything for this and the KDE thing defaults to using the application name but if you have the newer version, SDL sets "My SDL Application". |
Looks like old versions of SDL simply don't block sleep. I don't get any sleep blockage when running the 0.55.2 release |
The comment in the code is pretty self explanatory. This has been tested on KDE only.
Screenshots demonstrating what this fixes are below. I do not believe this has any effect on macOS or Windows, documentation suggests this relates to dbus. Hopefully I have done this correctly.
Documentation here:
https://discourse.libsdl.org/t/sdl-add-sdl-hint-app-name-and-dbus-inhibition-hint/32698
https://wiki.libsdl.org/SDL2/SDL_HINT_APP_NAME
OLD:

NEW:
