From 6f53dd114a1690ca8018407ad6ba0680d30ce0d7 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 25 Nov 2023 23:56:41 +0200 Subject: [PATCH] libretro: direct fb access requires duping support because video doesn't necessary update at vsync rate libretro/pcsx_rearmed#805 --- frontend/libretro.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/libretro.c b/frontend/libretro.c index 80dc8a9d..ed4bb5bd 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -237,7 +237,10 @@ static void set_vout_fb() fb.access_flags = RETRO_MEMORY_ACCESS_WRITE; vout_pitch = vout_width; - if (environ_cb(RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER, &fb) && fb.format == RETRO_PIXEL_FORMAT_RGB565) { + if (environ_cb(RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER, &fb) + && fb.format == RETRO_PIXEL_FORMAT_RGB565 + && vout_can_dupe && duping_enable) + { vout_buf_ptr = fb.data; if (fb.pitch / 2 != vout_pitch && fb.pitch != vout_width * 2) SysPrintf("got unusual pitch %zd for resolution %dx%d\n", fb.pitch, vout_width, vout_height); -- 2.39.5