OpenEmu: Fix Info.plist, saves

This commit is contained in:
Jeffrey Pfau 2016-01-02 16:07:23 -08:00
parent 929f21002d
commit c2340bb44f
3 changed files with 17 additions and 4 deletions

View File

@ -588,8 +588,8 @@ if(BUILD_OPENEMU)
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/platform/openemu/Info.plist.in
BUNDLE TRUE
BUNDLE_EXTENSION oecoreplugin
OUTPUT_NAME ${PROJECT_NAME}EmuCore
COMPILE_DEFINITIONS "DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=2")
OUTPUT_NAME ${PROJECT_NAME}
COMPILE_DEFINITIONS "DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=1")
target_link_libraries(${BINARY_NAME}-openemu ${OS_LIB} ${FOUNDATION} ${OPENEMUBASE})
install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)
endif()

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>${PROJECT_NAME}</string>
<key>CFBundleIconFile</key>
<string>mGBA</string>
<key>CFBundleIdentifier</key>
@ -25,6 +25,8 @@
<key>OEGameCoreOptions</key>
<dict>
<key>openemu.system.gba</key>
<dict>
</dict>
</dict>
<key>OEGameCorePlayerCount</key>
<string>1</string>

View File

@ -94,6 +94,18 @@
- (BOOL)loadFileAtPath:(NSString *)path error:(NSError **)error
{
UNUSED(error);
NSString *batterySavesDirectory = [self batterySavesDirectoryPath];
NSLog(batterySavesDirectory);
[[NSFileManager defaultManager] createDirectoryAtURL:[NSURL fileURLWithPath:batterySavesDirectory]
withIntermediateDirectories:YES
attributes:nil
error:nil];
if (context.dirs.save) {
context.dirs.save->close(context.dirs.save);
}
context.dirs.save = VDirOpen([batterySavesDirectory UTF8String]);
if (!GBAContextLoadROM(&context, [path UTF8String], true)) {
return NO;
}
@ -124,7 +136,6 @@
- (void)stopEmulation
{
NSLog(@"Stopping");
GBAContextStop(&context);
[super stopEmulation];
}