- fixed compile on Linux and (maybe?) Mac

This commit is contained in:
raa-eruanna 2017-11-01 04:13:10 -04:00
parent d313ef4b61
commit 7d4f8af245
2 changed files with 14 additions and 7 deletions

View file

@ -1523,10 +1523,16 @@ void I_SetMainWindowVisible(bool visible)
// each platform has its own specific version of this function.
void I_SetWindowTitle(const char* title)
{
static NSString* const TITLE_STRING;
if (title)
TITLE_STRING = [NSString stringWithFormat:@"%s", title];
{
static NSString* const TITLE_STRING =
[NSString stringWithFormat:@"%s", title];
[m_window setTitle:TITLE_STRING];
}
else
TITLE_STRING = [NSString stringWithFormat:@"%s %s", GAMESIG, GetVersionString()];
[m_window setTitle:TITLE_STRING];
{
static NSString* const TITLE_STRING =
[NSString stringWithFormat:@"%s %s", GAMESIG, GetVersionString()];
[m_window setTitle:TITLE_STRING];
}
}

View file

@ -556,11 +556,12 @@ ADD_STAT (blit)
void I_SetWindowTitle(const char* caption)
{
if (caption)
SDL_SetWindowTitle(Screen, caption);
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), caption);
else
{
FString default_caption;
default_caption.Format(GAMESIG " %s (%s)", GetVersionString(), GetGitTime());
SDL_SetWindowTitle(Screen, default_caption);
SDL_SetWindowTitle(static_cast<SDLFB *>(screen)->GetSDLWindow(), default_caption);
}
}