From 884b93c4c02a5ec584f657c8f6127b6f121f875c Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Wed, 6 Nov 2024 19:51:03 +0000 Subject: [PATCH] Add: Set application name for SDL2 (#13061) --- src/video/sdl2_v.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 08723ef3b6d..6a287552c0e 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -556,6 +556,10 @@ std::optional VideoDriver_SDL_Base::Start(const StringList &pa } #endif +#ifdef SDL_HINT_APP_NAME + SDL_SetHint(SDL_HINT_APP_NAME, "OpenTTD"); +#endif + this->startup_display = FindStartupDisplay(GetDriverParamInt(param, "display", -1)); if (!CreateMainSurface(_cur_resolution.width, _cur_resolution.height, false)) {