mirror of https://github.com/mgba-emu/mgba.git
OpenEmu: Add rewinding support
This commit is contained in:
parent
7f4320e872
commit
656260c129
|
@ -26,6 +26,12 @@
|
|||
<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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue