Changing config location for sidecar builds (#17)
For sidecar executables (unity editor, for example), there's no package directory, since they are win32 apps. For those executables, use the current working directory as the root for loading the config file.
This commit is contained in:
Родитель
8f10cc4af5
Коммит
6ae8880704
|
@ -30,9 +30,14 @@ xbox_live_result<void> local_config::read()
|
|||
return xbox_live_result<void>();
|
||||
}
|
||||
|
||||
#if XSAPI_SIDECAR
|
||||
string_t configPath = _T("xboxservices.config");
|
||||
#else
|
||||
Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current;
|
||||
Windows::Storage::StorageFolder^ installedLocation = package->InstalledLocation;
|
||||
string_t configPath = string_t(installedLocation->Path->Data()) + _T("\\xboxservices.config");
|
||||
#endif
|
||||
|
||||
|
||||
string_t fileData = utils::read_file_to_string(configPath);
|
||||
if( !fileData.empty() )
|
||||
|
|
Загрузка…
Ссылка в новой задаче