21 #include "../../SDL_internal.h"
23 #ifdef SDL_FILESYSTEM_COCOA
28 #include <Foundation/Foundation.h>
30 #include <sys/types.h>
40 NSBundle *bundle = [NSBundle mainBundle];
41 const char* baseType = [[[bundle infoDictionary] objectForKey:@"SDL_FILESYSTEM_BASE_DIR_TYPE"] UTF8String];
42 const char *base =
NULL;
45 if (baseType ==
NULL) {
46 baseType =
"resource";
49 base = [[bundle bundlePath] fileSystemRepresentation];
51 base = [[[bundle bundlePath] stringByDeletingLastPathComponent] fileSystemRepresentation];
54 base = [[bundle resourcePath] fileSystemRepresentation];
83 NSArray *
array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
86 NSString *str = [array objectAtIndex:0];
87 const char *base = [str fileSystemRepresentation];
100 for (ptr =
retval+1; *ptr; ptr++) {