diff --git a/src/core/game_list.cpp b/src/core/game_list.cpp index 56c41b81c..2017afa5d 100644 --- a/src/core/game_list.cpp +++ b/src/core/game_list.cpp @@ -689,6 +689,11 @@ void GameList::SetSearchDirectoriesFromSettings(SettingsInterface& si) m_search_directories.push_back({std::move(dir), true}); } +bool GameList::IsDatabasePresent() const +{ + return FileSystem::FileExists(m_database_filename.c_str()); +} + void GameList::Refresh(bool invalidate_cache, bool invalidate_database) { if (invalidate_cache) diff --git a/src/core/game_list.h b/src/core/game_list.h index cd66b26e1..d80dd8ecf 100644 --- a/src/core/game_list.h +++ b/src/core/game_list.h @@ -65,8 +65,10 @@ public: void SetCacheFilename(std::string filename) { m_cache_filename = std::move(filename); } void SetDatabaseFilename(std::string filename) { m_database_filename = std::move(filename); } - void SetSearchDirectoriesFromSettings(SettingsInterface& si); + + bool IsDatabasePresent() const; + void AddDirectory(std::string path, bool recursive); void Refresh(bool invalidate_cache, bool invalidate_database);