SDL/src/filesystem
Ryan C. Gordon 6d1ad3847a 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
..
android Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
cocoa Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
dummy Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
emscripten Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
haiku Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
nacl Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
unix Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
windows Windows GetBasePath should use GetModuleFileNameExW() and check for overflows. 2015-05-28 01:54:52 -04:00
winrt Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00