GameList: Auto set cache/database path from user directory

This commit is contained in:
Connor McLaughlin
2020-01-24 14:51:09 +10:00
parent feb48899c3
commit b4c06fdcc6
9 changed files with 35 additions and 64 deletions

View File

@ -54,6 +54,8 @@ HostInterface::HostInterface()
{
SetUserDirectory();
m_game_list = std::make_unique<GameList>();
m_game_list->SetCacheFilename(GetGameListCacheFileName());
m_game_list->SetDatabaseFilename(GetGameListDatabaseFileName());
m_settings.SetDefaults();
m_last_throttle_time = Common::Timer::GetValue();
}
@ -485,6 +487,16 @@ std::string HostInterface::GetSettingsFileName() const
return GetUserDirectoryRelativePath("settings.ini");
}
std::string HostInterface::GetGameListCacheFileName() const
{
return GetUserDirectoryRelativePath("cache/gamelist.cache");
}
std::string HostInterface::GetGameListDatabaseFileName() const
{
return GetUserDirectoryRelativePath("cache/redump.dat");
}
void HostInterface::RunFrame()
{
m_frame_timer.Reset();