Play-/tools/PsfPlayer/Source/AppConfig.cpp

27 lines
551 B
C++
Raw Normal View History

#include "AppConfig.h"
#include "PathUtils.h"
2019-10-17 21:06:53 -04:00
#define BASE_DATA_PATH ("PsfPlayer Data Files")
#define CONFIG_FILENAME ("config.xml")
2018-04-30 21:01:23 +01:00
CAppConfig::CAppConfig()
: CConfig(BuildConfigPath())
{
}
2023-08-31 11:11:04 -04:00
Framework::CConfig::PathType CAppConfig::BuildConfigPath()
{
2023-08-31 11:11:04 -04:00
return GetBasePath() / CONFIG_FILENAME;
}
2023-08-31 11:11:04 -04:00
CAppConfigBasePath::CAppConfigBasePath()
{
2023-08-31 11:11:04 -04:00
m_basePath = Framework::PathUtils::GetPersonalDataPath() / BASE_DATA_PATH;
Framework::PathUtils::EnsurePathExists(m_basePath);
}
2023-08-31 11:11:04 -04:00
fs::path CAppConfigBasePath::GetBasePath() const
{
2023-08-31 11:11:04 -04:00
return m_basePath;
}