Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
WinRT: made path retrieval functions return NULL on Windows Phone whe…
Browse files Browse the repository at this point in the history
…never said data isn't available
  • Loading branch information
DavidLudwig committed Feb 3, 2013
1 parent a20af4e commit 03c860f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/core/windowsrt/SDL_winrtpaths.cpp
Expand Up @@ -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__ */

0 comments on commit 03c860f

Please sign in to comment.