diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-01-23 08:44:23 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-01-23 08:44:23 +0000 |
| commit | 912c53cda0997e17d32d0b854823c3334b419db5 (patch) | |
| tree | 158f8a7ae9c68235fe4e1c14fa1efe5533242dc8 /macosx | |
| parent | cd40452e610e32935cfc5bae96cc77209f79e7d9 (diff) | |
| download | pcsxr-912c53cda0997e17d32d0b854823c3334b419db5.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@40648 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx')
| -rw-r--r-- | macosx/PcsxController.m | 9 | ||||
| -rw-r--r-- | macosx/main.m | 23 |
2 files changed, 20 insertions, 12 deletions
diff --git a/macosx/PcsxController.m b/macosx/PcsxController.m index db16729b..05a6b867 100644 --- a/macosx/PcsxController.m +++ b/macosx/PcsxController.m @@ -372,6 +372,10 @@ NSString *saveStatePath; if (![dfm fileExistsAtPath:path isDirectory:&dir]) [dfm createDirectoryAtPath:path attributes:nil]; + path = [NSString stringWithFormat:@"%@/Pcsx/Patches", supportPath]; + if (![dfm fileExistsAtPath:path isDirectory:&dir]) + [dfm createDirectoryAtPath:path attributes:nil]; + saveStatePath = [[NSString stringWithFormat:@"%@/Pcsx/Save States", supportPath] retain]; if (![dfm fileExistsAtPath:saveStatePath isDirectory:&dir]) [dfm createDirectoryAtPath:saveStatePath attributes:nil]; @@ -387,8 +391,13 @@ NSString *saveStatePath; path = [NSString stringWithFormat:@"%@/Pcsx/Bios/", supportPath]; str = [path fileSystemRepresentation]; if (str != nil) strncpy(Config.BiosDir, str, 255); + + path = [NSString stringWithFormat:@"%@/Pcsx/Patches/", supportPath]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.PatchesDir, str, 255); } else { strcpy(Config.BiosDir, "Bios/"); + strcpy(Config.PatchesDir, "Patches/"); saveStatePath = @"sstates"; [saveStatePath retain]; diff --git a/macosx/main.m b/macosx/main.m index 22efb1fc..55d33968 100644 --- a/macosx/main.m +++ b/macosx/main.m @@ -38,17 +38,16 @@ int main(int argc, const char *argv[]) assert ( chdir ("../../../") == 0 ); /* chdir to the .app's parent */ } - // TODO: make this redundant strcpy(Config.BiosDir, "Bios/"); - - // Setup the X11 window + strcpy(Config.PatchesDir, "Patches/"); + + // Setup the X11 window if (getenv("DISPLAY") == NULL) setenv("DISPLAY", ":0.0", 0); // Default to first local display return NSApplicationMain(argc, argv); } - int SysInit() { if (!sysInited) { #ifdef GTE_DUMP @@ -144,11 +143,11 @@ void *SysLoadLibrary(char *lib) CFBundleRef myBundle; CFURLRef bundleURL; CFStringRef path; - + path = CFStringCreateWithCString(kCFAllocatorDefault, lib, CFStringGetSystemEncoding()); if (!path) goto error; - + bundleURL = CFURLCreateWithFileSystemPath( kCFAllocatorDefault, path, @@ -156,16 +155,16 @@ void *SysLoadLibrary(char *lib) true ); if (!bundleURL) goto error; - + myBundle = CFBundleCreate( kCFAllocatorDefault, bundleURL ); - + if (!CFBundleLoadExecutable(myBundle)) goto error; - + good: if (path) CFRelease(path); if (bundleURL) CFRelease(bundleURL); - + return myBundle; error: @@ -214,10 +213,10 @@ void PADhandleKey(int key); void SysUpdate() { UpdateSystemActivity(UsrActivity); - + PADhandleKey(PAD1_keypressed()); //PADhandleKey(PAD2_keypressed()); - + [emuThread handleEvents]; } |
