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);
85 if ([array
count] > 0) {
86 NSString *str = [array objectAtIndex:0];
87 const char *base = [str fileSystemRepresentation];
100 for (ptr = retval+1; *ptr; ptr++) {
GLuint GLuint GLsizei count
#define SDL_InvalidParamError(param)
#define SDL_OutOfMemory()
Include file for filesystem SDL API functions.
char * SDL_GetBasePath(void)
Get the path where the application resides.