DolphinQt2: Don't show invalid games in game list

Regression from 1f1dae3.

This problem doesn't happen in DolphinWX as far as I know, but if
you've ran into the problem in DolphinQt2, it will carry over to
DolphinWX because of the shared game list cache.
This commit is contained in:
JosJuice
2018-03-29 21:52:21 +02:00
parent d3f432946f
commit ff2fe73ec9
3 changed files with 11 additions and 3 deletions

View File

@ -173,7 +173,9 @@ void GameTracker::LoadGame(const QString& path)
if (!DiscIO::ShouldHideFromGameList(converted_path))
{
bool cache_changed = false;
emit GameLoaded(m_cache.AddOrGet(converted_path, &cache_changed, m_title_database));
auto game = m_cache.AddOrGet(converted_path, &cache_changed, m_title_database);
if (game)
emit GameLoaded(std::move(game));
if (cache_changed)
m_cache.Save();
}