Skip to content

Commit

Permalink
Better fix: only process if the emulator has initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
PGGB committed Nov 1, 2013
1 parent 27ede4a commit c271c05
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions PPSSPPGameCore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ - (void)executeFrame

host->BootDone();
host->UpdateDisassembly();

// Process save states here for auto-loading
SaveState::Process();
}

NativeRender();
Expand Down Expand Up @@ -212,13 +209,14 @@ static void _OESaveStateCallback(bool status, void *cbUserData)
- (void)saveStateToFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
SaveState::Save([fileName UTF8String], _OESaveStateCallback, (__bridge_retained void *)[block copy]);
SaveState::Process();
if(_isInitialized) SaveState::Process();
}


- (void)loadStateFromFileAtPath:(NSString *)fileName completionHandler:(void (^)(BOOL, NSError *))block
{
SaveState::Load([fileName UTF8String], _OESaveStateCallback, (__bridge_retained void *)[block copy]);
if(_isInitialized) SaveState::Process();
}

# pragma mark - Input
Expand Down

0 comments on commit c271c05

Please sign in to comment.