From 732311a730152b399743041baa6d3ad64b5eb574 Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Thu, 2 Feb 2023 19:01:57 +0100 Subject: [PATCH] Remove os.shutdown, superseded by machine lib --- Capy64/Runtime/Libraries/OS.cs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Capy64/Runtime/Libraries/OS.cs b/Capy64/Runtime/Libraries/OS.cs index 5944521..03e03c7 100644 --- a/Capy64/Runtime/Libraries/OS.cs +++ b/Capy64/Runtime/Libraries/OS.cs @@ -15,31 +15,5 @@ public class OS : IPlugin public void LuaInit(Lua state) { state.GetGlobal("os"); - - state.PushString("shutdown"); - state.PushCFunction(L_Shutdown); - state.SetTable(-3); - } - - private static int L_Shutdown(IntPtr state) - { - var L = Lua.FromIntPtr(state); - - var doReboot = false; - if (L.IsBoolean(1)) - { - doReboot = L.ToBoolean(1); - } - - if (doReboot) - { - RuntimeManager.Reboot(); - } - else - { - RuntimeManager.Shutdown(); - } - - return 0; } }