diff --git a/code/components/citizen-server-gui/src/ServerGui.cpp b/code/components/citizen-server-gui/src/ServerGui.cpp index ccb691bfe6..dda6e32967 100644 --- a/code/components/citizen-server-gui/src/ServerGui.cpp +++ b/code/components/citizen-server-gui/src/ServerGui.cpp @@ -180,10 +180,19 @@ devgui_convar "Tools/Network/State/Player List" svplayerlist auto conCtx = m_instance->GetComponent(); auto hostNameVar = conCtx->GetVariableManager()->FindEntryRaw("sv_hostname"); auto iconVar = conCtx->GetVariableManager()->FindEntryRaw("sv_icon"); - auto gameNameVar = conCtx->GetVariableManager()->FindEntryRaw("gamename"); if (hostNameVar && consoleWindowState.lastHostname != hostNameVar->GetValue()) { + auto gameNameVar = conCtx->GetVariableManager()->FindEntryRaw("gamename"); + + if (!gameNameVar) + { + if (auto fallbackContext = conCtx->GetFallbackContext()) + { + gameNameVar = fallbackContext->GetVariableManager()->FindEntryRaw("gamename"); + } + } + consoleWindowState.lastHostname = hostNameVar->GetValue(); SetConsoleTitle(fmt::sprintf(L"Cfx.re Server (FXServer/%s) - %s", ToWide((gameNameVar) ? gameNameVar->GetValue() : "unknown"), ToWide(consoleWindowState.lastHostname)).c_str());