Fix SetRunningGameMetadata not being called for GC titles

GC titles don't have a title ID, so this regression would cause
SetRunningGameMetadata to never be called for GC titles.
This commit is contained in:
Léo Lam 2017-06-04 18:21:08 +02:00
parent 4e584ec039
commit 2e06756f2d
1 changed files with 2 additions and 5 deletions

View File

@ -719,11 +719,8 @@ void SConfig::ResetRunningGameMetadata()
void SConfig::SetRunningGameMetadata(const DiscIO::IVolume& volume,
const DiscIO::Partition& partition)
{
const std::optional<u64> title_id = volume.GetTitleID(partition);
if (!title_id)
return;
SetRunningGameMetadata(volume.GetGameID(partition), *title_id, volume.GetRevision(partition),
Core::TitleDatabase::TitleType::Other);
SetRunningGameMetadata(volume.GetGameID(partition), volume.GetTitleID(partition).value_or(0),
volume.GetRevision(partition), Core::TitleDatabase::TitleType::Other);
}
void SConfig::SetRunningGameMetadata(const IOS::ES::TMDReader& tmd)