mirror of https://github.com/PCSX2/pcsx2.git
VMManager: Move unknown serial print to UpdateRunningGame()
This commit is contained in:
parent
642adffeb8
commit
40bd19ccbb
|
@ -986,19 +986,6 @@ const GameDatabaseSchema::GameEntry* GameDatabase::findGame(const std::string_vi
|
|||
{
|
||||
GameDatabase::ensureLoaded();
|
||||
|
||||
std::string serialLower = StringUtil::toLower(serial);
|
||||
|
||||
if (serialLower.empty())
|
||||
return nullptr;
|
||||
|
||||
Console.WriteLn(fmt::format("[GameDB] Searching for '{}' in GameDB", serialLower));
|
||||
const auto gameEntry = s_game_db.find(serialLower);
|
||||
if (gameEntry != s_game_db.end())
|
||||
{
|
||||
Console.WriteLn(fmt::format("[GameDB] Found '{}' in GameDB", serialLower));
|
||||
return &gameEntry->second;
|
||||
}
|
||||
|
||||
Console.Error(fmt::format("[GameDB] Could not find '{}' in GameDB", serialLower));
|
||||
return nullptr;
|
||||
auto iter = s_game_db.find(StringUtil::toLower(serial));
|
||||
return (iter != s_game_db.end()) ? &iter->second : nullptr;
|
||||
}
|
||||
|
|
|
@ -707,7 +707,9 @@ void VMManager::UpdateRunningGame(UpdateGameReason reason)
|
|||
std::string memcardFilters;
|
||||
|
||||
if (s_game_crc == 0)
|
||||
{
|
||||
s_game_name = "Booting PS2 BIOS...";
|
||||
}
|
||||
else if (const GameDatabaseSchema::GameEntry* game = GameDatabase::findGame(s_game_serial))
|
||||
{
|
||||
if (!s_elf_override.empty())
|
||||
|
@ -717,6 +719,10 @@ void VMManager::UpdateRunningGame(UpdateGameReason reason)
|
|||
|
||||
memcardFilters = game->memcardFiltersAsString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Warning(fmt::format("Serial '{}' not found in GameDB.", s_game_serial));
|
||||
}
|
||||
|
||||
sioSetGameSerial(memcardFilters.empty() ? s_game_serial : memcardFilters);
|
||||
|
||||
|
|
Loading…
Reference in New Issue