mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
When NAND is damaged, show title names from save files
The earlier code always tried to use TitleDatabase for getting title names, but that didn't work for disc-based games, because there was no way to get the maker ID.
This commit is contained in:
@ -166,12 +166,12 @@ std::string TitleDatabase::GetTitleName(const std::string& game_id, TitleType ty
|
||||
return iterator != map.end() ? iterator->second : "";
|
||||
}
|
||||
|
||||
std::string TitleDatabase::GetTitleName(u64 title_id) const
|
||||
std::string TitleDatabase::GetChannelName(u64 title_id) const
|
||||
{
|
||||
const std::string id{
|
||||
{static_cast<char>((title_id >> 24) & 0xff), static_cast<char>((title_id >> 16) & 0xff),
|
||||
static_cast<char>((title_id >> 8) & 0xff), static_cast<char>(title_id & 0xff)}};
|
||||
return GetTitleName(id, IOS::ES::IsChannel(title_id) ? TitleType::Channel : TitleType::Other);
|
||||
return GetTitleName(id, TitleType::Channel);
|
||||
}
|
||||
|
||||
std::string TitleDatabase::Describe(const std::string& game_id, TitleType type) const
|
||||
|
@ -27,7 +27,9 @@ public:
|
||||
// Get a user friendly title name for a game ID.
|
||||
// This falls back to returning an empty string if none could be found.
|
||||
std::string GetTitleName(const std::string& game_id, TitleType = TitleType::Other) const;
|
||||
std::string GetTitleName(u64 title_id) const;
|
||||
|
||||
// Same as above, but takes a title ID instead of a game ID, and can only find names of channels.
|
||||
std::string GetChannelName(u64 title_id) const;
|
||||
|
||||
// Get a description for a game ID (title name if available + game ID).
|
||||
std::string Describe(const std::string& game_id, TitleType = TitleType::Other) const;
|
||||
|
Reference in New Issue
Block a user