Re: [AD] SF.net SVN: alleg:[11437] allegro/branches/4.9

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 13-Jan-09, at 5:55 AM, strangemoose@xxxxxxxxxx wrote:
* add AL_EXENAME_PATH enum to al_get_path (needs osx impl)

Proposed patch attached.
There are a few things to note with this: first, the exepath is probably completely meaningless if the executable is inside a bundle, and it may make more sense to return the bundle path in that case (as Allegro 4.x does). Second, I've had to copy over _find_executable_file() from the UNIX port, which is a bit ugly (shouldn't this lose the leading _ btw?); I had to change _al_sane_strncpy(pathname+len+1, filename, strlen(filename)) to _al_sane_strncpy(pathname+len+1, filename, strlen(filename)+1) or the last character of the filename would be chopped off.

Evert

Attachment: osx_exepath.diff
Description: Binary data




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/