| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | size_t new_wpath_len = 0; |
| | | BOOL api_result = FALSE; |
| | | |
| | | if (!app) { |
| | | SDL_InvalidParamError("app"); |
| | | return NULL; |
| | | } |
| | | if (!org) { |
| | | org = ""; |
| | | } |
| | | |
| | | srcPath = SDL_WinRTGetFSPathUNICODE(SDL_WINRT_PATH_LOCAL_FOLDER); |
| | | if ( ! srcPath) { |
| | | SDL_SetError("Unable to find a source path"); |
| | |
| | | return NULL; |
| | | } |
| | | |
| | | SDL_wcslcat(path, L"\\", new_wpath_len + 1); |
| | | SDL_wcslcat(path, worg, new_wpath_len + 1); |
| | | SDL_free(worg); |
| | | if (*worg) { |
| | | SDL_wcslcat(path, L"\\", new_wpath_len + 1); |
| | | SDL_wcslcat(path, worg, new_wpath_len + 1); |
| | | SDL_free(worg); |
| | | } |
| | | |
| | | api_result = CreateDirectoryW(path, NULL); |
| | | if (api_result == FALSE) { |
| | |
| | | } |
| | | |
| | | #endif /* __WINRT__ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |