WinRT: made path retrieval functions return NULL on Windows Phone whenever said data isn't available

This commit is contained in:
David Ludwig 2013-02-03 12:38:55 -05:00
parent 2ef67300a3
commit 1aed239483

View File

@ -42,23 +42,31 @@ SDL_WinRTGetLocalFolderPath()
extern "C" const wchar_t *
SDL_WinRTGetRoamingFolderPath()
{
// TODO, WinRT: make SDL_WinRTGetRoamingFolderPath return NULL on Windows Phone 8
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
SDL_Unsupported();
return NULL;
#else
static const wchar_t * path = nullptr;
if (!path) {
path = WINRT_CopySystemPath(ApplicationData::Current->RoamingFolder);
}
return path;
#endif
}
extern "C" const wchar_t *
SDL_WinRTGetTemporaryFolderPath()
{
// TODO, WinRT: make SDL_WinRTGetTemporaryFolderPath return NULL on Windows Phone 8
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
SDL_Unsupported();
return NULL;
#else
static const wchar_t * path = nullptr;
if (!path) {
path = WINRT_CopySystemPath(ApplicationData::Current->TemporaryFolder);
}
return path;
#endif
}
#endif /* __WINRT__ */