aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authornotaz2011-02-10 23:31:59 +0200
committernotaz2011-02-10 23:31:59 +0200
commit3e215238e4b5f93b471679d12cd2144cb49b95b1 (patch)
tree3534ed515fd6dc708925ccd347c3dba5e581e272 /frontend
parentacb57d8d14a903b691ac06aced5829c31ef447ce (diff)
downloadpcsx_rearmed-3e215238e4b5f93b471679d12cd2144cb49b95b1.tar.gz
pcsx_rearmed-3e215238e4b5f93b471679d12cd2144cb49b95b1.tar.bz2
pcsx_rearmed-3e215238e4b5f93b471679d12cd2144cb49b95b1.zip
frontend: tune frameskip a bit more
also init analog vars as centered (in case they are never updated)
Diffstat (limited to 'frontend')
-rw-r--r--frontend/plugin_lib.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c
index 975fc0a..5cf1ff4 100644
--- a/frontend/plugin_lib.c
+++ b/frontend/plugin_lib.c
@@ -30,7 +30,7 @@
void *pl_fbdev_buf;
int pl_frame_interval;
-int in_type, in_keystate, in_a1[2], in_a2[2];
+int in_type, in_keystate, in_a1[2] = { 127, 127 }, in_a2[2] = { 127, 127 };
static int pl_fbdev_w, pl_fbdev_h, pl_fbdev_bpp;
static int flip_cnt, vsync_cnt, flips_per_sec, tick_per_sec;
static float vsps_cur;
@@ -226,11 +226,16 @@ void pl_frame_limit(void)
usleep(diff - pl_frame_interval / 2);
}
- plugin_skip_advice = 0;
- if (UseFrameSkip && diff < -pl_frame_interval) {
- // P.E.Op.S. makes skip decision based on this
- fps_skip = 1.0f;
- plugin_skip_advice = 1;
+ if (UseFrameSkip) {
+ if (diff < -pl_frame_interval) {
+ // P.E.Op.S. makes skip decision based on this
+ fps_skip = 1.0f;
+ plugin_skip_advice = 1;
+ }
+ else if (diff >= 0) {
+ fps_skip = 100.0f;
+ plugin_skip_advice = 0;
+ }
}
pcnt_start(PCNT_ALL);