From 6aa2e9017b8ad3d3cea322b71147666daa00af74 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 10 Aug 2022 13:03:53 +1000 Subject: [PATCH] GameDatabase: Fix cache not invalidating when out-of-date --- src/core/game_database.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/game_database.cpp b/src/core/game_database.cpp index a10425f6c..ca0de6593 100644 --- a/src/core/game_database.cpp +++ b/src/core/game_database.cpp @@ -542,6 +542,12 @@ bool GameDatabase::LoadFromCache() return false; } + if (gamedb_ts != file_gamedb_ts || gamesettings_ts != file_gamesettings_ts || compat_ts != file_compat_ts) + { + Log_DevPrintf("Cache is out of date, recreating."); + return false; + } + s_entries.reserve(num_entries); for (u32 i = 0; i < num_entries; i++)