23 #ifdef SDL_FILESYSTEM_COCOA
28 #include <Foundation/Foundation.h>
33 #include "SDL_stdinc.h"
39 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
40 NSBundle *bundle = [NSBundle mainBundle];
41 const char* baseType = [[[bundle infoDictionary] objectForKey:@"SDL_FILESYSTEM_BASE_DIR_TYPE"] UTF8String];
42 const char *base =
NULL;
44 if (baseType ==
NULL) {
45 baseType =
"resource";
48 base = [[bundle bundlePath] UTF8String];
50 base = [[[bundle bundlePath] stringByDeletingLastPathComponent] UTF8String];
53 base = [[bundle resourcePath] UTF8String];
72 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
73 NSArray *
array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
78 if ([array
count] > 0) {
79 NSString *
str = [array objectAtIndex:0];
80 const char *base = [str UTF8String];
89 for (ptr = retval+1; *ptr; ptr++) {
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt,...)
DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app)
Get the user-and-app-specific path where files can be written.
DECLSPEC void *SDLCALL SDL_malloc(size_t size)
DECLSPEC size_t SDLCALL SDL_strlen(const char *str)
#define SDL_OutOfMemory()
Include file for filesystem SDL API functions.
DECLSPEC char *SDLCALL SDL_GetBasePath(void)
Get the path where the application resides.
DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2)