X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fvout_fb.c;h=20c8ff3973cd0e646165eaf71526b5e8367eebd1;hp=65fbc038af1a61c80a94ca523cfedfba3844e923;hb=652c6b8b676be0172612da811b38dd5f87fa2870;hpb=fb4c6fba4c83b2f00a78c331fd56e5d995ce02ab diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index 65fbc038..20c8ff39 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -25,10 +25,23 @@ int vout_finish(void) return 0; } -static void blit(void) +static void check_mode_change(void) { static uint32_t old_status; static int old_h; + + // width|rgb24 change? + if ((gpu.status.reg ^ old_status) & ((7<<16)|(1<<21)) || gpu.screen.h != old_h) + { + old_status = gpu.status.reg; + old_h = gpu.screen.h; + screen_buf = cbs->pl_vout_set_mode(gpu.screen.hres, + gpu.screen.h, gpu.status.rgb24 ? 24 : 16); + } +} + +static void blit(void) +{ int x = gpu.screen.x & ~1; // alignment needed by blitter int y = gpu.screen.y; int w = gpu.screen.w; @@ -39,14 +52,6 @@ static void blit(void) uint8_t *dest; fb_offs = y * 1024 + x; - - if ((gpu.status.reg ^ old_status) & ((7<<16)|(1<<21)) || h != old_h) // width|rgb24 change? - { - old_status = gpu.status.reg; - old_h = h; - screen_buf = cbs->pl_vout_set_mode(stride, h, gpu.status.rgb24 ? 24 : 16); - } - dest = (uint8_t *)screen_buf; // only do centering, at least for now @@ -83,25 +88,16 @@ static void blit(void) screen_buf = cbs->pl_vout_flip(); } -void GPUupdateLace(void) +void vout_update(void) { - if (gpu.status.blanking || !gpu.state.fb_dirty) - return; - - if (gpu.frameskip.set) { - if (!gpu.frameskip.frame_ready) { - if (*gpu.state.frame_count - gpu.frameskip.last_flip_frame < 9) - return; - } - gpu.frameskip.frame_ready = 0; - } - - renderer_flush_queues(); - blit(); - gpu.state.fb_dirty = 0; + check_mode_change(); + if (cbs->pl_vout_raw_flip) + cbs->pl_vout_raw_flip(gpu.screen.x, gpu.screen.y); + else + blit(); } -long GPUopen(void) +long GPUopen(void **unused) { gpu.frameskip.active = 0; gpu.frameskip.frame_ready = 1; @@ -117,15 +113,9 @@ long GPUclose(void) return 0; } -void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_) +void vout_set_config(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; - gpu.state.hcnt = cbs->gpu_hcnt; - gpu.state.frame_count = cbs->gpu_frame_count; } // vim:shiftwidth=2:expandtab