From 1aed239483a7325576a5a2f2ecc4ef5d5e691899 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 3 Feb 2013 12:38:55 -0500 Subject: [PATCH] WinRT: made path retrieval functions return NULL on Windows Phone whenever said data isn't available --- src/core/windowsrt/SDL_winrtpaths.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/windowsrt/SDL_winrtpaths.cpp b/src/core/windowsrt/SDL_winrtpaths.cpp index 40c05dc20..01f3c371a 100644 --- a/src/core/windowsrt/SDL_winrtpaths.cpp +++ b/src/core/windowsrt/SDL_winrtpaths.cpp @@ -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__ */