all repos — mgba @ 656260c1299744d1c82cd1d9c4a8d5ec132a05d1

mGBA Game Boy Advance Emulator

OpenEmu: Add rewinding support
Jeffrey Pfau jeffrey@endrift.com
Sat, 02 Jan 2016 17:17:08 -0800
commit

656260c1299744d1c82cd1d9c4a8d5ec132a05d1

parent

7f4320e8722775d06ed5bb17f51efb078cc269d0

2 files changed, 8 insertions(+), 2 deletions(-)

jump to
M src/platform/openemu/Info.plist.insrc/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.msrc/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;