1
0
Fork 0

Fix 089c7a2: SDL2 application name hint was not effective. (#13926)

pull/13947/head
stormcone 2025-04-01 16:07:38 +02:00 committed by GitHub
parent 3c15e0c889
commit f8f76eb9f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -535,6 +535,10 @@ static std::optional<std::string_view> InitializeSDL()
/* Check if the video-driver is already initialized. */
if (SDL_WasInit(SDL_INIT_VIDEO) != 0) return std::nullopt;
#ifdef SDL_HINT_APP_NAME
SDL_SetHint(SDL_HINT_APP_NAME, "OpenTTD");
#endif
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) return SDL_GetError();
return std::nullopt;
}
@ -568,10 +572,6 @@ std::optional<std::string_view> 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)) {