Previous 199869 Revisions Next

r20254 Sunday 13th January, 2013 at 21:41:04 UTC by R. Belmont
Fix compiling on PowerPC OS X (nw)
[src/lib/portmidi]osxsupport.m readbinaryplist.c
[src/osd/sdl]sdl.mak

trunk/src/osd/sdl/sdl.mak
r20253r20254
251251ifndef USE_QTDEBUG
252252DEBUGOBJS = $(SDLOBJ)/debugosx.o
253253endif
254
254255SYNC_IMPLEMENTATION = ntc
255256SDLMAIN = $(SDLOBJ)/SDLMain_tmpl.o
256257SDLUTILMAIN = $(SDLOBJ)/SDLMain_tmpl.o
r20253r20254
259260NO_X11 = 1
260261NO_USE_XINPUT = 1
261262ifdef BIGENDIAN
263DEFS += -DOSX_PPC=1
262264ifdef SYMBOLS
263265CCOMFLAGS += -mlong-branch
264266endif   # SYMBOLS
trunk/src/lib/portmidi/osxsupport.m
r20253r20254
77#include "osxsupport.h"
88
99// convert an NSString to a C string
10#ifndef OSX_PPC
1011static char *StringToChar(NSString *str)
1112{
1213   const char *charstr = [str UTF8String];
r20253r20254
2526   {
2627      resstr = StringToChar([paths objectAtIndex:0]) ;
2728   }
28
2929   return resstr;
3030}
31#endif
32
trunk/src/lib/portmidi/readbinaryplist.c
r20253r20254
380380   return value;
381381}
382382
383// use old Carbon method on PPC
384#ifdef OSX_PPC
385value_ptr bplist_read_pref(char *filename, OSType folder_type)
386{
387    FSRef prefdir;
388    char cstr[MAXPATHLEN];
383389
390    OSErr err = FSFindFolder(kOnAppropriateDisk, folder_type,
391                             FALSE, &prefdir);
392    if (err) {
393        bplist_log("Error finding preferences folder: %d\n", err);
394        return NULL;
395    }
396    err = FSRefMakePath(&prefdir, (UInt8 *) cstr, (UInt32) (MAXPATHLEN - 1));
397    if (err) {
398        bplist_log("Error making path name for preferences folder: %d\n", err);
399        return NULL;
400    }
401    strlcat(cstr, "/", MAXPATHLEN);
402    strlcat(cstr, filename, MAXPATHLEN);
403    return bplist_read_file(cstr);
404}
405#else
384406value_ptr bplist_read_pref(char *filename, OSType folder_type)
385407{
386408   char cstr[MAXPATHLEN];
r20253r20254
414436
415437   return bplist_read_file(cstr);
416438}
439#endif
417440
418
419441value_ptr bplist_read_system_pref(char *filename) {
420442   return bplist_read_pref(filename, kSystemPreferencesFolderType);
421443}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team