From: notaz Date: Sun, 23 Nov 2025 23:55:44 +0000 (+0200) Subject: cdrom: minor tweak from pcercuei X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b48e2876ab1ca6300acad223606eeb59f670d8f;p=pcsx_rearmed.git cdrom: minor tweak from pcercuei https://github.com/notaz/pcsx_rearmed/pull/390#issuecomment-3568471649 --- diff --git a/libpcsxcore/cdrom-async.c b/libpcsxcore/cdrom-async.c index ec5c8545..9df31150 100644 --- a/libpcsxcore/cdrom-async.c +++ b/libpcsxcore/cdrom-async.c @@ -89,7 +89,9 @@ static int c11_threads_cb_wrapper(void *cb) #include "../frontend/libretro-rthreads.h" #endif +#ifdef HAVE_LIBRETRO #include "retro_timers.h" +#endif struct cached_buf { u32 lba; @@ -151,8 +153,10 @@ static void lbacache_do(u32 lba) memcpy(acdrom.buf_cache[i].buf_sub, buf_sub, sizeof(buf_sub)); } slock_unlock(acdrom.buf_lock); +#ifdef HAVE_LIBRETRO if (g_cd_handle) retro_sleep(0); // why does the main thread stall without this? +#endif } static int lbacache_get(unsigned int lba, void *buf, void *sub_buf)