adjust bios handling again
[pcsx_rearmed.git] / frontend / libretro.c
index 3e74b23..4477183 100644 (file)
@@ -501,7 +501,7 @@ struct rearmed_cbs pl_rearmed_cbs = {
 void pl_frame_limit(void)
 {
    /* called once per frame, make psxCpu->Execute() above return */
-   stop = 1;
+   stop++;
 }
 
 void pl_timing_prepare(int is_pal)
@@ -1966,9 +1966,11 @@ static void update_variables(bool in_flight)
       psxCpu = (Config.Cpu == CPU_INTERPRETER) ? &psxInt : &psxRec;
       if (psxCpu != prev_cpu)
       {
+         prev_cpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL);
          prev_cpu->Shutdown();
          psxCpu->Init();
-         psxCpu->Reset(); // not really a reset..
+         psxCpu->Reset();
+         psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, NULL);
       }
    }
 #endif /* !DRC_DISABLE */
@@ -2074,6 +2076,16 @@ static void update_variables(bool in_flight)
          spu_config.iUseInterpolation = 0;
    }
 
+   var.value = NULL;
+   var.key = "pcsx_rearmed_spu_thread";
+   if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+   {
+      if (strcmp(var.value, "enabled") == 0)
+         spu_config.iUseThread = 1;
+      else
+         spu_config.iUseThread = 0;
+   }
+
 #ifndef _WIN32
    var.value = NULL;
    var.key = "pcsx_rearmed_async_cd";
@@ -2696,12 +2708,6 @@ void retro_run(void)
    {
       rebootemu = 0;
       SysReset();
-      if (!Config.HLE && !Config.SlowBoot)
-      {
-         // skip BIOS logos
-         psxRegs.pc = psxRegs.GPR.n.ra;
-      }
-      return;
    }
 
    print_internal_fps();