1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

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

This commit is contained in:
stormcone
2025-04-01 16:07:38 +02:00
committed by GitHub
parent 3c15e0c889
commit f8f76eb9f3

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)) {