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=b84a86b92dbc473fdc1b1b4d3a295db3ab0f7dec;hp=864776ec788cdc075ad4801f6598bb0cf5d5bc12;hb=7d993ee2dec1905c689ec0787f6543247fae665c;hpb=9fe27e257939224d5a85975dee39f63f50b7e3dc;ds=sidebyside diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index 864776ec..b84a86b9 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 @@ -97,7 +102,11 @@ void GPUupdateLace(void) } renderer_flush_queues(); - blit(); + check_mode_change(); + if (cbs->pl_vout_raw_flip) + cbs->pl_vout_raw_flip(gpu.screen.x, gpu.screen.y); + else + blit(); gpu.state.fb_dirty = 0; }