Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c
source/src/filesystem/winrt/SDL_sysfilesystem.cpp
@@ -1,6 +1,6 @@
/*
  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
@@ -152,6 +152,14 @@
    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");
@@ -186,9 +194,11 @@
        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) {
@@ -219,3 +229,5 @@
}
#endif /* __WINRT__ */
/* vi: set ts=4 sw=4 expandtab: */