From 03ffb30c3920af9c5206f5479876deaf1afe8ab2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 9 Apr 2018 11:48:56 +0300 Subject: [PATCH] Enabled custom window title in SDL backend --- src/posix/sdl/sdlglvideo.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index a3e0a1a22..60152f15c 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -477,16 +477,13 @@ int SystemFrameBuffer::GetClientHeight() // each platform has its own specific version of this function. void I_SetWindowTitle(const char* caption) { -#if 0 - // This needs to be done differently. The static_cast here is fundamentally wrong because SDLFB is not the true ancestor of the screen's class. - auto Screen = static_cast(screen)->GetSDLWindow(); + auto window = static_cast(screen)->GetSDLWindow(); if (caption) - SDL_SetWindowTitle(static_cast(screen)->GetSDLWindow(), caption); + SDL_SetWindowTitle(window, caption); else { FString default_caption; default_caption.Format(GAMESIG " %s (%s)", GetVersionString(), GetGitTime()); - SDL_SetWindowTitle(static_cast(screen)->GetSDLWindow(), default_caption); + SDL_SetWindowTitle(window, default_caption); } -#endif }