WinRT: made path retrieval functions return NULL on Windows Phone whenever said data isn't available
authorDavid Ludwig <dludwig@pobox.com>
Sun, 03 Feb 2013 12:38:55 -0500
changeset 8404 47cfa104ad27
parent 8403 fbf6bb26c8ce
child 8405 fe893b2d6f4d
WinRT: made path retrieval functions return NULL on Windows Phone whenever said data isn't available
src/core/windowsrt/SDL_winrtpaths.cpp
--- a/src/core/windowsrt/SDL_winrtpaths.cpp	Sun Feb 03 12:34:34 2013 -0500
+++ b/src/core/windowsrt/SDL_winrtpaths.cpp	Sun Feb 03 12:38:55 2013 -0500
@@ -42,23 +42,31 @@
 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__ */