mirror of https://github.com/mgba-emu/mgba.git
OpenEmu: Fix Info.plist, saves
This commit is contained in:
parent
929f21002d
commit
c2340bb44f
|
@ -588,8 +588,8 @@ if(BUILD_OPENEMU)
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/platform/openemu/Info.plist.in
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/src/platform/openemu/Info.plist.in
|
||||||
BUNDLE TRUE
|
BUNDLE TRUE
|
||||||
BUNDLE_EXTENSION oecoreplugin
|
BUNDLE_EXTENSION oecoreplugin
|
||||||
OUTPUT_NAME ${PROJECT_NAME}EmuCore
|
OUTPUT_NAME ${PROJECT_NAME}
|
||||||
COMPILE_DEFINITIONS "DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=2")
|
COMPILE_DEFINITIONS "DISABLE_THREADING;${OS_DEFINES};${FUNCTION_DEFINES};MINIMAL_CORE=1")
|
||||||
target_link_libraries(${BINARY_NAME}-openemu ${OS_LIB} ${FOUNDATION} ${OPENEMUBASE})
|
target_link_libraries(${BINARY_NAME}-openemu ${OS_LIB} ${FOUNDATION} ${OPENEMUBASE})
|
||||||
install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)
|
install(TARGETS ${BINARY_NAME}-openemu LIBRARY DESTINATION ${LIBDIR} COMPONENT ${BINARY_NAME}.oecoreplugin NAMELINK_SKIP)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${PROJECT_NAME}</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>mGBA</string>
|
<string>mGBA</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
@ -25,6 +25,8 @@
|
||||||
<key>OEGameCoreOptions</key>
|
<key>OEGameCoreOptions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>openemu.system.gba</key>
|
<key>openemu.system.gba</key>
|
||||||
|
<dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>OEGameCorePlayerCount</key>
|
<key>OEGameCorePlayerCount</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
|
|
|
@ -94,6 +94,18 @@
|
||||||
- (BOOL)loadFileAtPath:(NSString *)path error:(NSError **)error
|
- (BOOL)loadFileAtPath:(NSString *)path error:(NSError **)error
|
||||||
{
|
{
|
||||||
UNUSED(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)) {
|
if (!GBAContextLoadROM(&context, [path UTF8String], true)) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +136,6 @@
|
||||||
|
|
||||||
- (void)stopEmulation
|
- (void)stopEmulation
|
||||||
{
|
{
|
||||||
NSLog(@"Stopping");
|
|
||||||
GBAContextStop(&context);
|
GBAContextStop(&context);
|
||||||
[super stopEmulation];
|
[super stopEmulation];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue