Use a more lightweight reset method for lightrec
authorZachary Cook <zachcook1991@gmail.com>
Thu, 20 Feb 2020 03:27:52 +0000 (22:27 -0500)
committerZachary Cook <zachcook1991@gmail.com>
Thu, 20 Feb 2020 03:27:52 +0000 (22:27 -0500)
Reset is common when using runahead, this seems to prevent crashes
when resets occur rapidly.

libpcsxcore/lightrec/plugin.c

index 64587be..3cd672a 100644 (file)
@@ -564,8 +564,10 @@ static void lightrec_plugin_shutdown(void)
 
 static void lightrec_plugin_reset(void)
 {
-       lightrec_plugin_shutdown();
-       lightrec_plugin_init();
+// Called in every frame (or every frame where input changes) when using runahead
+//     lightrec_plugin_shutdown();
+//     lightrec_plugin_init();
+       lightrec_invalidate_all(lightrec_state);
 }
 
 R3000Acpu psxRec =