From af486d6e6500b327e3fe34848848f6331ef777b2 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 15 Sep 2022 19:11:11 +0300 Subject: [PATCH] frontend: handle double res rendering, enable on x86_64 --- configure | 6 ++++++ frontend/plat_sdl.c | 5 +++-- frontend/plugin_lib.c | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 8ef59ced..2352ec6a 100755 --- a/configure +++ b/configure @@ -288,6 +288,12 @@ aarch64) builtin_gpu="neon" fi ;; +x86_64) + enable_dynarec="no" + if [ "x$builtin_gpu" = "x" ]; then + builtin_gpu="neon" + fi + ;; *) # dynarec only available on ARM enable_dynarec="no" diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c index 5e11cf84..5f29b90c 100644 --- a/frontend/plat_sdl.c +++ b/frontend/plat_sdl.c @@ -147,8 +147,9 @@ void plat_init(void) SDL_WM_SetCaption("PCSX-ReARMed " REV, NULL); shadow_size = g_menuscreen_w * g_menuscreen_h * 2; - if (shadow_size < 640 * 512 * 2) - shadow_size = 640 * 512 * 2; + // alloc enough for double res. rendering + if (shadow_size < 1024 * 512 * 2) + shadow_size = 1024 * 512 * 2; shadow_fb = malloc(shadow_size); menubg_img = malloc(shadow_size); diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index cc3576bf..588f1337 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -308,6 +308,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) unsigned char *dest = pl_vout_buf; const unsigned short *src = vram; int dstride = pl_vout_w, h1 = h; + int h_full = pl_vout_h - pl_vout_yoffset; int doffs; pcnt_start(PCNT_BLIT); @@ -318,7 +319,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) pl_plat_clear(); else memset(pl_vout_buf, 0, - dstride * pl_vout_h * pl_vout_bpp / 8); + dstride * h_full * pl_vout_bpp / 8); goto out_hud; } @@ -334,7 +335,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) pl_plat_clear(); else memset(pl_vout_buf, 0, - dstride * pl_vout_h * pl_vout_bpp / 8); + dstride * h_full * pl_vout_bpp / 8); clear_counter--; } -- 2.39.5