diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2014-12-25 17:12:56 +0300 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2014-12-25 17:12:56 +0300 |
commit | c1f54bcdcca40ef74fac2fa269824f612b4ed8d8 (patch) | |
tree | 7de2a04db49f8f5b22301b7d57bbea08cafb1f4e /intern/ghost | |
parent | 3e034831de809cf0d65aec9f4d5b445f875dcff2 (diff) |
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.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index cfa1e8bf566..61caf3f727e 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -255,6 +255,24 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) return GHOST_kKeyUnknown; } +#pragma mark Utility functions + +#define FIRSTFILEBUFLG 512 +static bool g_hasFirstFile = false; +static char g_firstFileBuf[512]; + +//TODO:Need to investigate this. Function called too early in creator.c to have g_hasFirstFile == true +extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) +{ + if (g_hasFirstFile) { + strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1); + buf[FIRSTFILEBUFLG - 1] = '\0'; + return 1; + } + else { + return 0; + } +} #pragma mark Cocoa objects |