SDL_GetPrefPath() now uses the organization on all platforms.

Even if that's not the general convention for a given platform.
This commit is contained in:
Ryan C. Gordon
2013-10-23 00:58:20 -04:00
parent 298d3d627a
commit 28aa076c8b
3 changed files with 6 additions and 8 deletions

View File

@@ -178,14 +178,14 @@ SDL_GetPrefPath(const char *org, const char *app)
if (envr[len - 1] == '/')
append += 1;
len += SDL_strlen(append) + SDL_strlen(app) + 2;
len += SDL_strlen(append) + SDL_strlen(org) + SDL_strlen(app) + 3;
retval = (char *) SDL_malloc(len);
if (!retval) {
SDL_OutOfMemory();
return NULL;
}
SDL_snprintf(retval, len, "%s%s%s/", envr, append, app);
SDL_snprintf(retval, len, "%s%s%s/%s/", envr, append, org, app);
for (ptr = retval+1; *ptr; ptr++) {
if (*ptr == '/') {