diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-03-28 21:47:05 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-03-28 21:47:05 +0000 |
| commit | a92f831335493c2ed789a3f746861af49ef5e4c8 (patch) | |
| tree | 7d423b62aa08268aa067e9d9c014d289c347e978 /macosx/EmuThread.m | |
| parent | b7761528326a064c81aaba3ebc275b394b3e1283 (diff) | |
| download | pcsxr-a92f831335493c2ed789a3f746861af49ef5e4c8.tar.gz | |
OS X:
Tell PCSX-R to push the save state status text to the GUI after emulation resumes.
Tweak the networking a small bit.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89708 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/EmuThread.m')
| -rwxr-xr-x | macosx/EmuThread.m | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m index 3ddffdcb..f116d4c3 100755 --- a/macosx/EmuThread.m +++ b/macosx/EmuThread.m @@ -291,7 +291,8 @@ done: return YES; [EmuThread pause]; - while ([EmuThread isPaused] != 2) [NSThread sleepUntilDate:[[NSDate date] dateByAddingTimeInterval:0.05]]; + while ([EmuThread isPaused] != 2) + [NSThread sleepUntilDate:[[NSDate date] dateByAddingTimeInterval:0.05]]; return NO; } @@ -361,17 +362,21 @@ done: + (void)freezeAt:(NSString *)path which:(int)num { [self pauseSafeWithBlock:^(BOOL emuWasPaused) { + int tmpNum = num; char Text[256]; - GPU_freeze(2, (GPUFreeze_t *)&num); + GPU_freeze(2, (GPUFreeze_t *)&tmpNum); int ret = SaveState([path fileSystemRepresentation]); - if (ret == 0) sprintf (Text, _("*PCSXR*: Saved State %d"), num); - else sprintf (Text, _("*PCSXR*: Error Saving State %d"), num); - GPU_displayText(Text); if (!emuWasPaused) { [EmuThread resume]; } + + if (ret == 0) + snprintf(Text, sizeof(Text), _("*PCSXR*: Saved State %d"), num); + else + snprintf(Text, sizeof(Text), _("*PCSXR*: Error Saving State %d"), num); + GPU_displayText(Text); }]; } |
