From: Paul Cercueil Date: Sat, 11 Jun 2022 08:40:13 +0000 (+0100) Subject: plugins: Fix build of unai/neon X-Git-Tag: r24l~453^2~2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9db55a9831ccbe3749abfc97ff49e5fb9379b29;p=pcsx_rearmed.git plugins: Fix build of unai/neon The gpu.status does not use bit-fields anymore following 61124a6d ("Get rid of bit fields in union") because it was not endian-safe. Signed-off-by: Paul Cercueil --- diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index 81b9bae2..59f69934 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -138,7 +138,8 @@ void renderer_sync_ecmds(uint32_t *ecmds) void renderer_update_caches(int x, int y, int w, int h) { update_texture_cache_region(&egpu, x, y, x + w - 1, y + h - 1); - if (gpu.state.enhancement_active && !gpu.status.rgb24) + if (gpu.state.enhancement_active && + !(gpu.status & PSX_GPU_STATUS_RGB24)) sync_enhancement_buffers(x, y, w, h); } diff --git a/plugins/gpu_unai/gpulib_if.cpp b/plugins/gpu_unai/gpulib_if.cpp index 588134d0..0066ce03 100644 --- a/plugins/gpu_unai/gpulib_if.cpp +++ b/plugins/gpu_unai/gpulib_if.cpp @@ -312,7 +312,7 @@ void renderer_notify_res_change(void) /* printf("res change hres: %d vres: %d depth: %d ilace_mask: %d\n", - gpu.screen.hres, gpu.screen.vres, gpu.status.rgb24 ? 24 : 15, + gpu.screen.hres, gpu.screen.vres, (gpu.status & PSX_GPU_STATUS_RGB24) ? 24 : 15, gpu_unai.ilace_mask); */ } @@ -399,10 +399,10 @@ int do_cmd_list(u32 *list, int list_len, int *last_cmd) gpu_unai.ilace_mask = gpu_unai.config.ilace_force; #ifdef HAVE_PRE_ARMV7 /* XXX */ - gpu_unai.ilace_mask |= gpu.status.interlace; + gpu_unai.ilace_mask |= !!(gpu.status & PSX_GPU_STATUS_INTERLACE); #endif if (gpu_unai.config.scale_hires) { - gpu_unai.ilace_mask |= gpu.status.interlace; + gpu_unai.ilace_mask |= !!(gpu.status & PSX_GPU_STATUS_INTERLACE); } for (; list < list_end; list += 1 + len) diff --git a/plugins/gpulib/vout_sdl.c b/plugins/gpulib/vout_sdl.c index b8c4eae2..56ab811c 100644 --- a/plugins/gpulib/vout_sdl.c +++ b/plugins/gpulib/vout_sdl.c @@ -54,7 +54,7 @@ void vout_update(void) int i; SDL_LockSurface(screen); - if (gpu.status.rgb24) + if (gpu.status & PSX_GPU_STATUS_RGB24) { uint8_t *s; int y;