From df60ff553dce9497fc88f2ca6923f63eee41032a Mon Sep 17 00:00:00 2001 From: Damien Plisson Date: Tue, 16 Feb 2010 08:57:05 +0000 Subject: OSX/deprecated Carbon: user and system base dirs retrieval implementation As Carbon is bound to RIP, implemented only a static version of these retrieval functions. --- intern/ghost/intern/GHOST_SystemCarbon.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index be1df2247d7..52b797f56b5 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -1217,10 +1217,23 @@ void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, bool selection) const GHOST_TUns8* GHOST_SystemCarbon::getSystemDir() const { - + static GHOST_TUns8 sysPath[64]; + + strcpy((char*)sysPath,"/Library/Application Support/Blender"); + + return sysPath; } GHOST_TUns8* GHOST_SystemCarbon::getUserDir() const { - + static char usrPath[512] = ""; + char* env = getenv("HOME"); + + if (env) { + strcpy(usrPath, env); + strcat(usrPath, "/Library/Application Support/Blender"); + return (GHOST_TUns8*) usrPath; + } + else + return NULL; } -- cgit v1.2.3