GameList: Add function to query whether database exists
This commit is contained in:
parent
f6fee86f1c
commit
c5faa36f43
|
@ -689,6 +689,11 @@ void GameList::SetSearchDirectoriesFromSettings(SettingsInterface& si)
|
||||||
m_search_directories.push_back({std::move(dir), true});
|
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)
|
void GameList::Refresh(bool invalidate_cache, bool invalidate_database)
|
||||||
{
|
{
|
||||||
if (invalidate_cache)
|
if (invalidate_cache)
|
||||||
|
|
|
@ -65,8 +65,10 @@ public:
|
||||||
|
|
||||||
void SetCacheFilename(std::string filename) { m_cache_filename = std::move(filename); }
|
void SetCacheFilename(std::string filename) { m_cache_filename = std::move(filename); }
|
||||||
void SetDatabaseFilename(std::string filename) { m_database_filename = std::move(filename); }
|
void SetDatabaseFilename(std::string filename) { m_database_filename = std::move(filename); }
|
||||||
|
|
||||||
void SetSearchDirectoriesFromSettings(SettingsInterface& si);
|
void SetSearchDirectoriesFromSettings(SettingsInterface& si);
|
||||||
|
|
||||||
|
bool IsDatabasePresent() const;
|
||||||
|
|
||||||
void AddDirectory(std::string path, bool recursive);
|
void AddDirectory(std::string path, bool recursive);
|
||||||
void Refresh(bool invalidate_cache, bool invalidate_database);
|
void Refresh(bool invalidate_cache, bool invalidate_database);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue