HostInterface: Move running title info to System
This commit is contained in:
@ -438,7 +438,7 @@ void HostInterface::UpdateSpeedLimiterState()
|
||||
|
||||
void HostInterface::OnPerformanceCountersUpdated() {}
|
||||
|
||||
void HostInterface::OnRunningGameChanged(const char* path, const char* game_code, const char* game_title) {}
|
||||
void HostInterface::OnRunningGameChanged() {}
|
||||
|
||||
void HostInterface::SetUserDirectory()
|
||||
{
|
||||
@ -540,31 +540,3 @@ void HostInterface::ResetPerformanceCounters()
|
||||
m_worst_frame_time_accumulator = 0.0f;
|
||||
m_fps_timer.Reset();
|
||||
}
|
||||
|
||||
void HostInterface::UpdateRunningGame(const char* path, CDImage* image)
|
||||
{
|
||||
if (!path || std::strlen(path) == 0)
|
||||
{
|
||||
OnRunningGameChanged("", "", "");
|
||||
return;
|
||||
}
|
||||
|
||||
const GameListEntry* list_entry = m_game_list->GetEntryForPath(path);
|
||||
if (list_entry)
|
||||
{
|
||||
OnRunningGameChanged(path, list_entry->code.c_str(), list_entry->title.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string game_code = image ? GameList::GetGameCodeForImage(image) : std::string();
|
||||
const GameListDatabaseEntry* db_entry =
|
||||
(!game_code.empty()) ? m_game_list->GetDatabaseEntryForCode(game_code) : nullptr;
|
||||
if (!db_entry)
|
||||
{
|
||||
const std::string game_title(GameList::GetTitleForPath(path));
|
||||
OnRunningGameChanged(path, game_code.c_str(), game_title.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
OnRunningGameChanged(path, db_entry->code.c_str(), db_entry->title.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user