Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify the game by its name in SDL #1503

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/engine/client/ClientApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ class ClientApplication : public Application {
// Don't set this for TTY applications as they really aren't DPI aware. Let them scale.
SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "system");
#endif

#if defined(__linux__) && defined(BUILD_GRAPHICAL_CLIENT)
// identify the game by its name in certain
// volume control / power control applets,
cu-kai marked this conversation as resolved.
Show resolved Hide resolved
// for example, the one found on KDE:
// "Unvanquished is currently blocking sleep."
// instead of "My SDL application ..."
// this feature was introduced in SDL 2.0.22
SDL_SetHint("SDL_APP_NAME", PRODUCT_NAME);
// SDL_hints.h: #define SDL_HINT_APP_NAME "SDL_APP_NAME"
// don't use the macro here, in case
// SDL doesn't use current headers.
#endif

Hunk_Init();

Com_Init();
Expand Down
Loading