From e152203afd5ff3c6b13b975ecf062995327cde78 Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Thu, 20 Apr 2023 22:21:34 +0200 Subject: [PATCH] "Freeze" Lua state after calling machine.reboot --- Capy64/Runtime/Libraries/MachineLib.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Capy64/Runtime/Libraries/MachineLib.cs b/Capy64/Runtime/Libraries/MachineLib.cs index e92b502..3eb55d5 100644 --- a/Capy64/Runtime/Libraries/MachineLib.cs +++ b/Capy64/Runtime/Libraries/MachineLib.cs @@ -94,10 +94,14 @@ public class MachineLib : IComponent return 0; } - private static int L_Reboot(IntPtr _) + private static int L_Reboot(IntPtr state) { + var L = Lua.FromIntPtr(state); + RuntimeManager.Reboot(); + L.Yield(0); + return 0; }