mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
CommonHostInterface: Prefer serial from database, not image
This commit is contained in:
parent
2ece7d19c1
commit
8ad0f78ef7
|
@ -2861,15 +2861,19 @@ void CommonHostInterface::GetGameInfo(const char* path, CDImage* image, std::str
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (image)
|
|
||||||
*code = System::GetGameCodeForImage(image, true);
|
|
||||||
|
|
||||||
GameDatabase database;
|
GameDatabase database;
|
||||||
GameDatabaseEntry database_entry;
|
GameDatabaseEntry database_entry;
|
||||||
if (database.Load() && database.GetEntryForDisc(image, &database_entry))
|
if (database.Load() && database.GetEntryForDisc(image, &database_entry))
|
||||||
|
{
|
||||||
|
*code = std::move(database_entry.serial);
|
||||||
*title = std::move(database_entry.title);
|
*title = std::move(database_entry.title);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
*title = System::GetTitleForPath(path);
|
*title = System::GetTitleForPath(path);
|
||||||
|
if (image)
|
||||||
|
*code = System::GetGameCodeForImage(image, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,6 @@ public:
|
||||||
const GameListEntry* GetEntryForPath(const char* path) const;
|
const GameListEntry* GetEntryForPath(const char* path) const;
|
||||||
const GameListCompatibilityEntry* GetCompatibilityEntryForCode(const std::string& code) const;
|
const GameListCompatibilityEntry* GetCompatibilityEntryForCode(const std::string& code) const;
|
||||||
|
|
||||||
bool GetGameCodeAndTitleFromDatabase(const char* path, std::string* code, std::string* title);
|
|
||||||
|
|
||||||
void SetCacheFilename(std::string filename) { m_cache_filename = std::move(filename); }
|
void SetCacheFilename(std::string filename) { m_cache_filename = std::move(filename); }
|
||||||
void SetUserCompatibilityListFilename(std::string filename)
|
void SetUserCompatibilityListFilename(std::string filename)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue