mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
26 lines
551 B
C++
26 lines
551 B
C++
#include "AppConfig.h"
|
|
#include "PathUtils.h"
|
|
|
|
#define BASE_DATA_PATH ("PsfPlayer Data Files")
|
|
#define CONFIG_FILENAME ("config.xml")
|
|
|
|
CAppConfig::CAppConfig()
|
|
: CConfig(BuildConfigPath())
|
|
{
|
|
}
|
|
|
|
Framework::CConfig::PathType CAppConfig::BuildConfigPath()
|
|
{
|
|
return GetBasePath() / CONFIG_FILENAME;
|
|
}
|
|
|
|
CAppConfigBasePath::CAppConfigBasePath()
|
|
{
|
|
m_basePath = Framework::PathUtils::GetPersonalDataPath() / BASE_DATA_PATH;
|
|
Framework::PathUtils::EnsurePathExists(m_basePath);
|
|
}
|
|
|
|
fs::path CAppConfigBasePath::GetBasePath() const
|
|
{
|
|
return m_basePath;
|
|
}
|