Play-/Source/AppConfig.cpp
Jean-Philip Desjardins 3ea5126e66 Cleanup.
2017-12-31 11:02:53 -05:00

25 lines
530 B
C++

#include "AppConfig.h"
#include "PathUtils.h"
#define BASE_DATA_PATH (L"Play Data Files")
#define CONFIG_FILENAME (L"config.xml")
CAppConfig::CAppConfig()
: CConfig(BuildConfigPath())
{
}
Framework::CConfig::PathType CAppConfig::GetBasePath()
{
auto result = Framework::PathUtils::GetPersonalDataPath() / BASE_DATA_PATH;
return result;
}
Framework::CConfig::PathType CAppConfig::BuildConfigPath()
{
auto userPath(GetBasePath());
Framework::PathUtils::EnsurePathExists(userPath);
return userPath / CONFIG_FILENAME;
}