From c1f54bcdcca40ef74fac2fa269824f612b4ed8d8 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Thu, 25 Dec 2014 15:12:56 +0100 Subject: OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions. Dunno exactly why this was done earlier, but propose not to remove code not understood. --- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/gameengine') diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 3e87b4a06d5..915fe614957 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -80,6 +80,10 @@ extern "C" #include "IMB_imbuf.h" #include "IMB_moviecache.h" +#ifdef __APPLE__ + int GHOST_HACK_getFirstFile(char buf[]); +#endif + // For BLF #include "BLF_api.h" #include "BLF_translation.h" @@ -297,6 +301,12 @@ static void get_filename(int argc, char **argv, char *filename) if (BLI_exists(argv[argc-1])) { BLI_strncpy(filename, argv[argc-1], FILE_MAX); } + if (::strncmp(argv[argc-1], "-psn_", 5)==0) { + static char firstfilebuf[512]; + if (GHOST_HACK_getFirstFile(firstfilebuf)) { + BLI_strncpy(filename, firstfilebuf, FILE_MAX); + } + } } srclen -= ::strlen("MacOS/blenderplayer"); -- cgit v1.2.3