Ryan C. Gordon
f0a894ed28
filesystem: Patched to compile on QNX.
2017-08-17 03:22:44 -04:00
Ryan C. Gordon
166a2284f6
filesystem: QNX should use SDL_LoadFile() instead of rolling it from scratch.
2017-08-17 02:58:46 -04:00
Ryan C. Gordon
bc3d1f34a7
qnx: Implemented SDL_GetBasePath().
2017-08-17 01:25:48 -04:00
Sam Lantinga
6ec1321e60
Fixed bug 3639 - SDL_GetPrefPath returns a path with two consecutive slashes on Unix if org is omitted
...
Fabian Greffrath
we use SDL_GetPrefPath() in Chocolate Doom to get a reasonable directory to save and restore config files and savegames:
https://github.com/chocolate-doom/chocolate-doom/blob/sdl2-branch/src/m_config.c#L2162
However, since there is no "organization" behind Chocolate Doom and there is really only one "product" called Chocolate Doom, we pass an empty string for the org parameter and the package string for app.
This leads to two consecutive slashes in the path returned by SDL_GetPrefPath() like this:
/home/user/.local/share//chocolate-doom/
While this is harmless, it sure looks bad.
I believe that it should be possible to either pass a NULL pointer for the org parameter or at least have the function detect an empty string as a means to express "there is no origanization, just a single product". The generation of the path string to be returned by the function will have to get adapted accordingly.
2017-08-11 11:32:00 -07:00
Sam Lantinga
d77ab77a7a
Updated copyright for 2017
2017-01-01 18:33:28 -08:00
Sam Lantinga
e6a54327c7
David Carlier implemented SDL_GetBasePath() for OpenBSD
2016-01-31 21:11:15 -08:00
Sam Lantinga
255c182471
Updated copyright to 2016
2016-01-02 10:10:34 -08:00
Sam Lantinga
78f2198e6c
Updated the copyright year to 2015
2015-05-26 06:27:46 -07:00
Brandon Schaefer
aa844a18c6
Fix warnings, only major one being an SDL_SetError not providing enough arguments.
2014-06-05 15:29:23 -07:00
Sam Lantinga
dba255c1e5
Fixed bug 2374 - Update copyright for 2014...
...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
03d5719413
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
...
The new header will include SDL_config.h, but allows for other global stuff.
2013-11-24 23:56:17 -05:00
Ryan C. Gordon
e1ee854340
SDL_GetPrefPath() now uses the organization on all platforms.
...
Even if that's not the general convention for a given platform.
2013-10-23 00:58:20 -04:00
Sam Lantinga
753aae78fc
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
2013-08-29 08:29:21 -07:00
Sam Lantinga
79bc5ff6ac
Christoph Mallon: Correct indendation.
2013-08-29 08:27:25 -07:00
Sam Lantinga
e5bdcdce26
Christoph Mallon: Use SDL_arraysize()
2013-08-29 08:26:55 -07:00
Sam Lantinga
8f70297c38
Christoph Mallon: Report an error, if creating the directories in SDL_GetPrefPath() failed.
2013-08-29 08:25:54 -07:00
Sam Lantinga
3a2343d106
Christoph Mallon: Remove lone /* if */ comment.
2013-08-29 08:25:24 -07:00
Sam Lantinga
1f0046b99f
Christoph Mallon: Simplify avoidance of duplicate / in SDL_GetPrefPath()
2013-08-29 08:24:43 -07:00
Ryan C. Gordon
a9e59a9c1c
Minor FreeBSD code cleanup.
2013-08-24 21:15:10 -04:00
Edward Rudd
0d9b3f9116
Fix #2062 Be more diligent about validating trailing "/" existence in HOME and XDG_DATA_HOME env vars
2013-08-24 09:05:18 -04:00
Ryan C. Gordon
dcf1507675
Patched to compile on Solaris.
2013-08-23 23:34:23 -04:00
Ryan C. Gordon
e489ba1b6f
Patched to compile on FreeBSD.
2013-08-23 21:48:40 -04:00
Ryan C. Gordon
c25827b1f1
Add support for some BSDs and Solaris to SDL_GetBasePath().
2013-08-23 21:38:54 -04:00
Ryan C. Gordon
27f294dbb5
Patched new filesystem code to compile.
2013-08-20 20:15:15 -04:00
Ryan C. Gordon
8fe1cf47f2
Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
2013-08-20 19:57:11 -04:00