System: Fix title not showing for non-database discs

This commit is contained in:
Connor McLaughlin 2022-07-23 13:36:53 +10:00
parent cac9c3fe04
commit be03998be0
3 changed files with 8 additions and 2 deletions

View File

@ -2833,6 +2833,12 @@ void System::UpdateRunningGame(const char* path, CDImage* image, bool booting)
s_running_game_code = entry->serial;
s_running_game_title = entry->title;
}
else
{
const std::string display_name(FileSystem::GetDisplayNameFromPath(path));
s_running_game_code = GetGameCodeForImage(image, true);
s_running_game_title = Path::GetFileTitle(display_name);
}
if (image->HasSubImages() && g_settings.memory_card_use_playlist_title)
{

View File

@ -192,7 +192,7 @@ bool GameList::GetDiscListEntry(const std::string& path, Entry* entry)
}
else
{
const std::string display_name(FileSystem::GetDisplayNameFromPath(path));
const std::string display_name(Path::GetFileTitle(FileSystem::GetDisplayNameFromPath(path)));
// no game code, so use the filename title
entry->serial = System::GetGameCodeForImage(cdi.get(), true);

View File

@ -413,7 +413,7 @@ void SaveStateSelectorUI::RefreshList()
ListEntry li;
if (ssi)
InitializeListEntry(&li, &ssi.value(), std::move(path), i, true);
InitializeListEntry(&li, &ssi.value(), std::move(path), i, false);
else
InitializePlaceholderListEntry(&li, std::move(path), i, false);