OpenEmu: Fix Info.plist, saves
Jeffrey Pfau jeffrey@endrift.com
Sat, 02 Jan 2016 16:07:23 -0800
3 files changed,
17 insertions(+),
4 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -588,8 +588,8 @@ set_target_properties(${BINARY_NAME}-openemu PROPERTIES
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()
M
src/platform/openemu/Info.plist.in
→
src/platform/openemu/Info.plist.in
@@ -5,7 +5,7 @@ <dict>
<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 @@ <string>mGBAGameCore</string>
<key>OEGameCoreOptions</key> <dict> <key>openemu.system.gba</key> + <dict> + </dict> </dict> <key>OEGameCorePlayerCount</key> <string>1</string>
M
src/platform/openemu/mGBAGameCore.m
→
src/platform/openemu/mGBAGameCore.m
@@ -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]; }