mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Enabled custom window title in SDL backend
This commit is contained in:
parent
e6e2b11167
commit
03ffb30c39
1 changed files with 3 additions and 6 deletions
|
@ -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<SDLFB *>(screen)->GetSDLWindow();
|
||||
auto window = static_cast<SystemFrameBuffer *>(screen)->GetSDLWindow();
|
||||
if (caption)
|
||||
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), caption);
|
||||
SDL_SetWindowTitle(window, caption);
|
||||
else
|
||||
{
|
||||
FString default_caption;
|
||||
default_caption.Format(GAMESIG " %s (%s)", GetVersionString(), GetGitTime());
|
||||
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), default_caption);
|
||||
SDL_SetWindowTitle(window, default_caption);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue