From: notaz Date: Wed, 2 Nov 2022 22:49:53 +0000 (+0200) Subject: cdriso: disable the async code X-Git-Tag: r24l~348 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f47c8edde1a25e888b684056305a1e162f67869;p=pcsx_rearmed.git cdriso: disable the async code It will race with the new ISOgetBufferSub() and I have no desire to fix this as this async stuff was never submitted upstread, and according to the following report it's unstable: https://github.com/notaz/pcsx_rearmed/issues/257 --- diff --git a/frontend/libretro_core_options.h b/frontend/libretro_core_options.h index 39bc32b6..683173de 100644 --- a/frontend/libretro_core_options.h +++ b/frontend/libretro_core_options.h @@ -165,7 +165,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "disabled", }, -#ifndef _WIN32 +#if 0 // ndef _WIN32 // currently disabled, see USE_READ_THREAD in libpcsxcore/cdriso.c { "pcsx_rearmed_async_cd", "CD Access Method (Restart)", diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 5e74de1e..ce1d8cf9 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -42,6 +42,13 @@ #include #endif +#ifndef _WIN32 +// to enable the USE_READ_THREAD code, fix: +// - https://github.com/notaz/pcsx_rearmed/issues/257 +// - ISOgetBufferSub to not race with async code +//#define USE_READ_THREAD +#endif + #ifdef USE_LIBRETRO_VFS #include #undef fseeko @@ -1070,7 +1077,7 @@ static int opensbifile(const char *isoname) { return LoadSBI(sbiname, s); } -#ifdef _WIN32 +#ifndef USE_READ_THREAD static void readThreadStop() {} static void readThreadStart() {} #else @@ -1468,7 +1475,7 @@ static int cdread_2048(FILE *f, unsigned int base, void *dest, int sector) return 12*2 + ret; } -#ifndef _WIN32 +#ifdef USE_READ_THREAD static int cdread_async(FILE *f, unsigned int base, void *dest, int sector) { boolean found = FALSE; @@ -1526,7 +1533,7 @@ static unsigned char * CALLBACK ISOgetBuffer_chd(void) { } #endif -#ifndef _WIN32 +#ifdef USE_READ_THREAD static unsigned char * CALLBACK ISOgetBuffer_async(void) { unsigned char *buffer; pthread_mutex_lock(§orbuffer_lock);