Common paths standardization.

git-svn-id: https://openemu.svn.sourceforge.net/svnroot/openemu/branches/iosurface@748 a16923d9-94c8-4a39-ae78-11df2d60a2ba
This commit is contained in:
Remy Demarest
2010-04-16 05:52:53 +00:00
parent b4e87082e2
commit 3c7d5fcdce
2 changed files with 13 additions and 21 deletions
+1 -6
View File
@@ -42,7 +42,7 @@ NSArray *BSNESRawControlNames = nil;
forKey:OEControlsPreferenceKey]];
BSNESRawControlNames = [[NSArray alloc] initWithObjects:BSNESEmulatorNames
count:SNES_CONTROL_COUNT];
count:SNES_CONTROL_COUNT];
}
}
@@ -56,11 +56,6 @@ NSArray *BSNESRawControlNames = nil;
return MAC_MAX_PLAYERS;
}
- (NSString *)pluginName
{
return @"BSNESPlugin";
}
- (Class)gameCoreClass
{
return [BSNESGameEmu class];
+12 -15
View File
@@ -176,21 +176,18 @@ bool loadCartridge(const char *filename, SNES::MappedRAM &memory) {
- (void)stopEmulation
{
/*
NSString* path = [NSString stringWithUTF8String:Memory.ROMFilename];
NSString *extensionlessFilename = [[path lastPathComponent] stringByDeletingPathExtension];
NSString *appSupportPath = [[[NSHomeDirectory() stringByAppendingPathComponent:@"Library"] stringByAppendingPathComponent:@"Application Support"] stringByAppendingPathComponent:@"Snes9x"];
if(![[NSFileManager defaultManager] fileExistsAtPath:appSupportPath])
[[NSFileManager defaultManager] createDirectoryAtPath:appSupportPath attributes:nil];
NSLog(@"Trying to save SRAM");
NSString *batterySavesDirectory = [appSupportPath stringByAppendingPathComponent:@"Battery Saves"];
if(![[NSFileManager defaultManager] fileExistsAtPath:batterySavesDirectory])
[[NSFileManager defaultManager] createDirectoryAtPath:batterySavesDirectory attributes:nil];
NSString *filePath = [batterySavesDirectory stringByAppendingPathComponent:[extensionlessFilename stringByAppendingPathExtension:@"sav"]];
Memory.SaveSRAM( [filePath UTF8String] );
NSString *path = [NSString stringWithUTF8String:Memory.ROMFilename];
NSString *extensionlessFilename = [[path lastPathComponent] stringByDeletingPathExtension];
NSString *batterySavesDirectory = [self batterySavesDirectoryPath];
[[NSFileManager defaultManager] createDirectoryAtPath:batterySavesDirectory withIntermediateDirectories:YES attributes:nil error:NULL];
NSLog(@"Trying to save SRAM");
NSString *filePath = [batterySavesDirectory stringByAppendingPathComponent:[extensionlessFilename stringByAppendingPathExtension:@"sav"]];
Memory.SaveSRAM([filePath UTF8String]);
*/
[super stopEmulation];
}