mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Keep track of GameTDB ID separately from game ID
The difference between Dolphin's game IDs and GameTDB's game IDs is that GameTDB uses four characters for non-disc titles, whereas Dolphin uses six characters for all titles. This fixes: - TitleDatabase considering Datel discs to be NHL Hitz 2002 - Gecko code downloading not working for discs with IDs starting with P - Cover downloading mixing up discs with channels (e.g. Mario Kart Wii and Mario Kart Channel) and making extra HTTP requests. (Android was actually doing a better job at this than DolphinQt!)
This commit is contained in:
@ -18,21 +18,15 @@ public:
|
||||
TitleDatabase();
|
||||
~TitleDatabase();
|
||||
|
||||
enum class TitleType
|
||||
{
|
||||
Channel,
|
||||
Other,
|
||||
};
|
||||
|
||||
// Get a user friendly title name for a game ID.
|
||||
// Get a user friendly title name for a GameTDB ID.
|
||||
// This falls back to returning an empty string if none could be found.
|
||||
const std::string& GetTitleName(const std::string& game_id, TitleType = TitleType::Other) const;
|
||||
const std::string& GetTitleName(const std::string& gametdb_id) const;
|
||||
|
||||
// Same as above, but takes a title ID instead of a game ID, and can only find names of channels.
|
||||
// Same as above, but takes a title ID instead of a GameTDB ID, and only works for channels.
|
||||
const 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;
|
||||
// Get a description for a GameTDB ID (title name if available + GameTDB ID).
|
||||
std::string Describe(const std::string& gametdb_id) const;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, std::string> m_wii_title_map;
|
||||
|
Reference in New Issue
Block a user