From 6ae88807044c585eb66f65b924fb7c26e08e834e Mon Sep 17 00:00:00 2001 From: Cullen Waters Date: Mon, 5 Dec 2016 17:50:11 -0500 Subject: [PATCH] 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. --- Source/Shared/WinRT/local_config_winrt.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Shared/WinRT/local_config_winrt.cpp b/Source/Shared/WinRT/local_config_winrt.cpp index a73948ce..4a820da6 100644 --- a/Source/Shared/WinRT/local_config_winrt.cpp +++ b/Source/Shared/WinRT/local_config_winrt.cpp @@ -30,9 +30,14 @@ xbox_live_result local_config::read() return xbox_live_result(); } +#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() )