diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 8cea6be506..0863719a88 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -535,6 +535,10 @@ static std::optional 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 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)) {