summaryrefslogtreecommitdiff
path: root/libpcsxcore/psxcommon.c
diff options
context:
space:
mode:
authorSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-02-04 10:15:07 +0000
committerSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-02-04 10:15:07 +0000
commit10b7afe174672aded1c96f200722050df5638523 (patch)
tree5d11f078f85b819a425b83ed37a87ea3a33b865f /libpcsxcore/psxcommon.c
parentb7cde3470383649d6fc07f06f9d1a345052ac21e (diff)
Rewind: states are now made after n vblanks and platform independ way. Also GTK GUI to configure values. By default this feature is disabled (0 vblanks and 0 states)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@88837 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/psxcommon.c')
-rwxr-xr-xlibpcsxcore/psxcommon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpcsxcore/psxcommon.c b/libpcsxcore/psxcommon.c
index 959b9a7d..98525e51 100755
--- a/libpcsxcore/psxcommon.c
+++ b/libpcsxcore/psxcommon.c
@@ -29,6 +29,7 @@ boolean NetOpened = FALSE;
int Log = 0;
FILE *emuLog = NULL;
+u32 rewind_counter=0; // It is safe if this overflows
int EmuInit() {
return psxInit();
@@ -57,6 +58,10 @@ void EmuUpdate() {
SysUpdate();
ApplyCheats();
+
+ if (Config.RewindInterval > 0 && !(++rewind_counter%Config.RewindInterval)) {
+ CreateRewindState();
+ }
}
void __Log(char *fmt, ...) {