mirror of
https://github.com/libretro/Play-.git
synced 2024-11-27 18:50:28 +00:00
24 lines
529 B
C++
24 lines
529 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;
|
|
}
|