diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 69307bc82b..285f4c86b1 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -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; } diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index a99ef37173..abda9503da 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -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);