Add an option to show the active title in the title

This can be useful for figuring out at a glance what title is running,
along with its game ID / title ID.
This commit is contained in:
Léo Lam
2017-05-15 11:17:51 +02:00
parent 2f5f9be9ac
commit cfc0cc1453
3 changed files with 46 additions and 21 deletions

View File

@ -906,8 +906,14 @@ void UpdateTitle()
SystemTimers::GetTicksPerSecond() / 1000000, TicksPercentage);
}
}
// This is our final "frame counter" string
std::string SMessage = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str());
std::string message = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str());
if (SConfig::GetInstance().m_show_active_title)
{
const std::string& title = SConfig::GetInstance().GetTitleDescription();
if (!title.empty())
message += " | " + title;
}
// Update the audio timestretcher with the current speed
if (g_sound_stream)
@ -916,7 +922,7 @@ void UpdateTitle()
pMixer->UpdateSpeed((float)Speed / 100);
}
Host_UpdateTitle(SMessage);
Host_UpdateTitle(message);
}
void Shutdown()