aboutsummaryrefslogtreecommitdiff
path: root/source/nds/entry.cpp
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-05 19:39:09 -0500
committerNebuleon Fumika2013-02-05 19:39:09 -0500
commitf2adea7bb2250876df3d1b6e076a6b5380c6b13e (patch)
tree3c6fb146a57587ce4705cf0cea9afa3dc6488c37 /source/nds/entry.cpp
parente7ac6f675f9faf5894aea8dd80e01c649933c322 (diff)
downloadsnes9x2005-f2adea7bb2250876df3d1b6e076a6b5380c6b13e.tar.gz
snes9x2005-f2adea7bb2250876df3d1b6e076a6b5380c6b13e.tar.bz2
snes9x2005-f2adea7bb2250876df3d1b6e076a6b5380c6b13e.zip
Force both manual and automatic frameskipping to be at or above 2. Resets the default value for all games which previously had this value configured.
Diffstat (limited to 'source/nds/entry.cpp')
-rw-r--r--source/nds/entry.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp
index 18802a0..6cbf3ef 100644
--- a/source/nds/entry.cpp
+++ b/source/nds/entry.cpp
@@ -390,7 +390,7 @@ void game_set_frameskip()
}
else
{
- Settings.SkipFrames = game_config.frameskip_value - 1 /* 1 -> 0 and so on */;
+ Settings.SkipFrames = game_config.frameskip_value + 1 /* 1 -> 2 and so on */;
}
}
@@ -639,7 +639,6 @@ int sfc_main (int argc, char **argv)
static unsigned int sync_last= 0;
static unsigned int sync_next = 0;
-static unsigned int auto_equivalent_skip = 0;
static unsigned int skip_rate= 0;
@@ -690,7 +689,16 @@ void S9xSyncSpeed ()
// If this is negative, we're late by syncdif*42.66
// microseconds.
syncdif = sync_next - syncnow;
- if (syncdif < 0 && syncdif >= -(frame_time / 2))
+ if(skip_rate < 2 /* did not skip 2 frames yet */)
+ {
+ // Skip a minimum of 2 frames between rendered frames.
+ // This prevents the DSTwo-DS link from being too busy
+ // to return button statuses.
+ ++skip_rate;
+ IPPU.RenderThisFrame = FALSE;
+ sync_next += frame_time;
+ }
+ else if (syncdif < 0 && syncdif >= -(frame_time / 2))
{
// We're late, but by less than half a frame. Draw it
// anyway. If the next frame is too late, it'll be