From 169cfe5a7c9664291ddb519f2b8dae87fafdc774 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 14 Dec 2020 11:52:09 -0500 Subject: [PATCH] winrt: EffectiveLocation still needs an ifdef, IsApiContractPresent is for runtime --- src/filesystem/winrt/SDL_sysfilesystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/filesystem/winrt/SDL_sysfilesystem.cpp b/src/filesystem/winrt/SDL_sysfilesystem.cpp index 3ea1bd025..686673d46 100644 --- a/src/filesystem/winrt/SDL_sysfilesystem.cpp +++ b/src/filesystem/winrt/SDL_sysfilesystem.cpp @@ -48,12 +48,16 @@ SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType) { static wstring path; if (path.empty()) { +#if (NTDDI_VERSION >= NTDDI_WIN10_19H1) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) /* Only PC supports mods */ /* Windows 1903 supports mods, via the EffectiveLocation API */ if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) { path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data(); } else { path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); } +#else + path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); +#endif } return path.c_str(); }