Commit Graph

15 Commits

Author SHA1 Message Date
Sam Lantinga
d77ab77a7a Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
df2fba2fd0 Windows SDL_GetBasePath: free string on failure. 2015-05-28 15:36:27 -04:00
Ryan C. Gordon
e2d87dcdbd Windows GetBasePath: fixed reallocation code. 2015-05-28 15:32:45 -04:00
Ryan C. Gordon
909e52bccd Windows SDL_GetBasePath: Fixed wrong variable when growing the buffer size. 2015-05-28 15:29:43 -04:00
Sam Lantinga
a2df44ecd2 Fixed compiling and tested on Windows 2015-05-28 12:06:48 -07:00
Ryan C. Gordon
e5d9d21ecd Windows GetBasePath should use GetModuleFileNameExW() and check for overflows.
Apparently you might get strange paths from GetModuleFileName(), such as
short path names or UNC filenames, so this avoids that problem. Since you have
to tapdance with linking different libraries and defining macros depending on
what Windows you plan to target, we dynamically load the API we need, which
works on all versions of Windows (on Win7, it'll load a compatibility wrapper
for the newer API location).

What a mess.

This also now does the right thing if there isn't enough space to store the
path, looping with a larger allocated buffer each try.

Fixes Bugzilla #2435.
2015-05-28 01:54:52 -04:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Ryan C. Gordon
0568a0661e Removed unused variable. 2014-03-10 00:48:41 -04:00
Ryan C. Gordon
a2dcb239e0 Force Windows version of SDL_GetPrefPath() to Unicode, create missing dirs.
Fixes Bugzilla #2273.
2014-03-01 20:28:40 -05: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
9588bae18a More Windows fixes for filesystem code. 2013-08-20 20:29:30 -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