winrt: Buildfix for older UWP SDKs

main
Ethan Lee 2020-12-14 12:36:04 -05:00
parent e65e4fd3ef
commit f1c7cc710b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType)
{ {
static wstring path; static wstring path;
if (path.empty()) { if (path.empty()) {
#if (NTDDI_VERSION >= NTDDI_WIN10_19H1) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) /* Only PC supports mods */ #if defined(NTDDI_WIN10_19H1) && (NTDDI_VERSION >= NTDDI_WIN10_19H1) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) /* Only PC supports mods */
/* Windows 1903 supports mods, via the EffectiveLocation API */ /* Windows 1903 supports mods, via the EffectiveLocation API */
if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) { if (Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8, 0)) {
path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data(); path = Windows::ApplicationModel::Package::Current->EffectiveLocation->Path->Data();