From 6f33ba65d6470a99dac860dcd8472d47370be77f Mon Sep 17 00:00:00 2001 From: Deal Date: Sat, 23 Sep 2023 00:33:09 +0800 Subject: UWP: migrate C++/CX to C++/WinRT (#916) --- alc/alconfig.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'alc/alconfig.cpp') 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 // !!This is important!! +#include +#include +#include +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"; -- cgit v1.2.3