Update SDL to 2.0.7

This commit is contained in:
Alex Szpakowski
2017-10-28 22:36:09 -03:00
parent 7d27167be2
commit 4a2fd6d703
1400 changed files with 52242 additions and 127752 deletions
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2017 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
@@ -71,8 +71,15 @@ char *
SDL_GetPrefPath(const char *org, const char *app)
{ @autoreleasepool
{
char *retval = NULL;
if (!app) {
SDL_InvalidParamError("app");
return NULL;
}
if (!org) {
org = "";
}
char *retval = NULL;
NSArray *array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
if ([array count] > 0) { /* we only want the first item in the list. */
@@ -85,7 +92,11 @@ SDL_GetPrefPath(const char *org, const char *app)
SDL_OutOfMemory();
} else {
char *ptr;
SDL_snprintf(retval, len, "%s/%s/%s/", base, org, app);
if (*org) {
SDL_snprintf(retval, len, "%s/%s/%s/", base, org, app);
} else {
SDL_snprintf(retval, len, "%s/%s/", base, app);
}
for (ptr = retval+1; *ptr; ptr++) {
if (*ptr == '/') {
*ptr = '\0';