From: notaz Date: Sat, 25 Nov 2023 21:56:41 +0000 (+0200) Subject: libretro: direct fb access requires duping support X-Git-Tag: r24~38 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e82ffc4389a4699d0001133c7c2bffd9ee40edc;p=pcsx_rearmed.git libretro: direct fb access requires duping support because video doesn't necessary update at vsync rate libretro/pcsx_rearmed#805 --- 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);