OpenEmu: Add rewinding support
Jeffrey Pfau jeffrey@endrift.com
Sat, 02 Jan 2016 17:17:08 -0800
2 files changed,
8 insertions(+),
2 deletions(-)
M
src/platform/openemu/Info.plist.in
→
src/platform/openemu/Info.plist.in
@@ -26,6 +26,12 @@ <key>OEGameCoreOptions</key>
<dict> <key>openemu.system.gba</key> <dict> + <key>OEGameCoreRewindBufferSeconds</key> + <integer>1200</integer> + <key>OEGameCoreRewindInterval</key> + <integer>0</integer> + <key>OEGameCoreSupportsRewinding</key> + <true/> </dict> </dict> <key>OEGameCorePlayerCount</key>
M
src/platform/openemu/mGBAGameCore.m
→
src/platform/openemu/mGBAGameCore.m
@@ -209,7 +209,7 @@
- (NSData *)serializeStateWithError:(NSError **)outError { struct VFile* vf = VFileMemChunk(nil, 0); - if (!GBASaveStateNamed(context.gba, vf, 0)) { + if (!GBASaveStateNamed(context.gba, vf, SAVESTATE_SAVEDATA)) { *outError = [NSError errorWithDomain:OEGameCoreErrorDomain code:OEGameCoreCouldNotLoadStateError userInfo:nil]; vf->close(vf); return nil;@@ -225,7 +225,7 @@
- (BOOL)deserializeState:(NSData *)state withError:(NSError **)outError { struct VFile* vf = VFileFromConstMemory(state.bytes, state.length); - if (!GBALoadStateNamed(context.gba, vf, 0)) { + if (!GBALoadStateNamed(context.gba, vf, SAVESTATE_SAVEDATA)) { *outError = [NSError errorWithDomain:OEGameCoreErrorDomain code:OEGameCoreCouldNotLoadStateError userInfo:nil]; vf->close(vf); return NO;