Skip to content

Commit

Permalink
identify the game by its name in SDL
Browse files Browse the repository at this point in the history
  • Loading branch information
cu-kai committed Jan 17, 2025
1 parent d5a7987 commit 74b37c8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/engine/client/ClientApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ 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__) && __linux__ && defined(BUILD_GRAPHICAL_CLIENT)
#if SDL_VERSION_ATLEAST(2, 0, 22)
// identify the game by its name in certain
// volume control / power control applets,
// 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_HINT_APP_NAME, PRODUCT_NAME);
#endif
#endif

Hunk_Init();

Com_Init();
Expand Down

0 comments on commit 74b37c8

Please sign in to comment.