From ea4a16e7665cf6b4a68f5c017b346547d6455470 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 15 Sep 2011 01:33:57 +0300 Subject: add fixed frameskip option --- plugins/gpu_neon/gpu.c | 4 ++-- plugins/gpu_neon/gpu.h | 2 +- plugins/gpu_neon/vout_fb.c | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'plugins/gpu_neon') diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c index 03b0c71..c275d83 100644 --- a/plugins/gpu_neon/gpu.c +++ b/plugins/gpu_neon/gpu.c @@ -61,7 +61,7 @@ static noinline void decide_frameskip(void) { gpu.frameskip.frame_ready = !gpu.frameskip.active; - if (!gpu.frameskip.active && *gpu.frameskip.advice) + if (!gpu.frameskip.active && (*gpu.frameskip.advice || gpu.frameskip.set == 1)) gpu.frameskip.active = 1; else gpu.frameskip.active = 0; @@ -133,7 +133,7 @@ void GPUwriteStatus(uint32_t data) case 0x05: gpu.screen.x = data & 0x3ff; gpu.screen.y = (data >> 10) & 0x3ff; - if (gpu.frameskip.enabled) + if (gpu.frameskip.set) decide_frameskip(); break; case 0x06: diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h index a0cdbf7..04f69ab 100644 --- a/plugins/gpu_neon/gpu.h +++ b/plugins/gpu_neon/gpu.h @@ -71,7 +71,7 @@ struct psx_gpu { } last_list; } state; struct { - uint32_t enabled:1; + int32_t set:3; /* -1 auto, 0 off, 1 fixed */ uint32_t active:1; uint32_t frame_ready:1; uint32_t skipped_blits:5; diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index b2b5b25..6b687b3 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -84,7 +84,7 @@ void GPUupdateLace(void) if (gpu.status.blanking || !gpu.state.fb_dirty) return; - if (gpu.frameskip.enabled) { + if (gpu.frameskip.set) { if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 9) { gpu.frameskip.skipped_blits++; return; @@ -100,8 +100,6 @@ void GPUupdateLace(void) long GPUopen(void) { - gpu.frameskip.enabled = cbs->frameskip; - gpu.frameskip.advice = &cbs->fskip_advice; gpu.frameskip.active = 0; gpu.frameskip.frame_ready = 1; @@ -119,6 +117,10 @@ long GPUclose(void) void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_) { cbs = cbs_; + gpu.frameskip.set = cbs->frameskip; + gpu.frameskip.advice = &cbs->fskip_advice; + gpu.frameskip.active = 0; + gpu.frameskip.frame_ready = 1; } // vim:shiftwidth=2:expandtab -- cgit v1.2.3