psxinterpreter: yet more exceptions, new config option
[pcsx_rearmed.git] / frontend / libretro.c
index 7e5ac0c..32d0bec 100644 (file)
@@ -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
@@ -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);