X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=frontend%2Flibretro.c;h=2f758a6c8de15fde480fb10b3af4a773d1f27646;hb=684b6816254a31c40b0d11269aebb2a87fd79b74;hp=7e5ac0cb6229bd943814af54a317d0a07e587115;hpb=fdcde643ebe281e5cb71b2a4280a8db6103a4c12;p=pcsx_rearmed.git diff --git a/frontend/libretro.c b/frontend/libretro.c index 7e5ac0cb..2f758a6c 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -2047,6 +2047,16 @@ static void update_variables(bool in_flight) Config.icache_emulation = 1; } + var.value = NULL; + var.key = "pcsx_rearmed_exception_emulation"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (strcmp(var.value, "enabled") == 0) + Config.PreciseExceptions = 1; + else + Config.PreciseExceptions = 0; + } + psxCpu->ApplyConfig(); // end of CPU emu config @@ -2088,28 +2098,28 @@ static void update_variables(bool in_flight) spu_config.iUseThread = 0; } -#ifndef _WIN32 - var.value = NULL; - var.key = "pcsx_rearmed_async_cd"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - { - if (strcmp(var.value, "async") == 0) - { - Config.AsyncCD = 1; - Config.CHD_Precache = 0; - } - else if (strcmp(var.value, "sync") == 0) - { - Config.AsyncCD = 0; - Config.CHD_Precache = 0; - } - else if (strcmp(var.value, "precache") == 0) - { - Config.AsyncCD = 0; - Config.CHD_Precache = 1; - } + if (P_HAVE_PTHREAD) { + var.value = NULL; + var.key = "pcsx_rearmed_async_cd"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (strcmp(var.value, "async") == 0) + { + Config.AsyncCD = 1; + Config.CHD_Precache = 0; + } + else if (strcmp(var.value, "sync") == 0) + { + Config.AsyncCD = 0; + Config.CHD_Precache = 0; + } + else if (strcmp(var.value, "precache") == 0) + { + Config.AsyncCD = 0; + Config.CHD_Precache = 1; + } + } } -#endif var.value = NULL; var.key = "pcsx_rearmed_noxadecoding"; @@ -2817,7 +2827,7 @@ static bool find_any_bios(const char *dirpath, char *path, size_t path_size) if (dir == NULL) return false; - for (i = 0; sizeof(substrings) / sizeof(substrings[0]); i++) + for (i = 0; i < (sizeof(substrings) / sizeof(substrings[0])); i++) { const char *substr = substrings[i]; size_t len = strlen(substr); @@ -3027,7 +3037,7 @@ void retro_init(void) #ifdef _3DS vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80); -#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA) && !defined(__SWITCH__) +#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && P_HAVE_POSIX_MEMALIGN if (posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2) != 0) vout_buf = (void *) 0; #else