diff options
author | Deal <[email protected]> | 2023-09-23 00:33:09 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2023-09-22 16:33:09 +0000 |
commit | 6f33ba65d6470a99dac860dcd8472d47370be77f (patch) | |
tree | dc6fc9885625536b681c2267116adb207d109db6 /alc/alconfig.cpp | |
parent | 1b8c63910fc36a292ae591f5bedc8654c0173be9 (diff) |
UWP: migrate C++/CX to C++/WinRT (#916)
Diffstat (limited to 'alc/alconfig.cpp')
-rw-r--r-- | alc/alconfig.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp index 03139abe..097ba3a0 100644 --- a/alc/alconfig.cpp +++ b/alc/alconfig.cpp @@ -45,6 +45,13 @@ #include "strutils.h" #include "vector.h" +#if defined(ALSOFT_UWP) +#include <winrt/Windows.Media.Core.h> // !!This is important!! +#include <winrt/Windows.Storage.h> +#include <winrt/Windows.Foundation.h> +#include <winrt/Windows.Foundation.Collections.h> +using namespace winrt; +#endif namespace { @@ -336,7 +343,8 @@ void ReadALConfig() if (!SHGetSpecialFolderPathW(nullptr, buffer, CSIDL_APPDATA, FALSE)) return; #else - auto buffer = Windows::Storage::ApplicationData::Current->RoamingFolder->Path->Data(); + winrt::Windows::Storage::ApplicationDataContainer localSettings = winrt::Windows::Storage::ApplicationData::Current().LocalSettings(); + auto buffer = Windows::Storage::ApplicationData::Current().RoamingFolder().Path(); #endif std::string filepath{wstr_to_utf8(buffer)}; filepath += "\\alsoft.ini"; |