Play-/tools/PsfPlayer/Source/AppConfig.cpp
Jean-Philip Desjardins bac59761e0 Fix build issues.
2023-08-31 11:11:04 -04:00

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;
}