mirror of https://github.com/OpenTTD/OpenTTD
Fix 089c7a2: SDL2 application name hint was not effective. (#13926)
parent
3c15e0c889
commit
f8f76eb9f3
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue