mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
winrt: Add EffectiveLocation support for newer Win10 releases
This commit is contained in:
parent
16d789fba9
commit
a7d91ebaa5
@ -48,7 +48,12 @@ SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType)
|
|||||||
{
|
{
|
||||||
static wstring path;
|
static wstring path;
|
||||||
if (path.empty()) {
|
if (path.empty()) {
|
||||||
path = Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
|
/* 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return path.c_str();
|
return path.c_str();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user