Initial commit

This commit is contained in:
Michael Smith 2017-11-09 21:59:27 +01:00
commit 823c7f97a9
2 changed files with 37 additions and 0 deletions

27
shutdown/init.lua Normal file
View File

@ -0,0 +1,27 @@
-- license:BSD-3-Clause
-- copyright-holders:Michael Smith
local exports = {}
exports.name = "shutdown"
exports.version = "0.0.1"
exports.description = "Allows you to shut down a Windows system from within the MAME menu."
exports.license = "The BSD 3-Clause License"
exports.author = { name = "Michael Smith" }
local shutdown = exports
function shutdown.startplugin()
local function menu_populate()
return {{ "Really shut down system?", "", "off" }, { "No", "", "" }, { "Yes", "", "" }}
end
local function menu_callback(index, event)
if event == "select" and index == 3 then
os.execute("shutdown /s /t 0")
end
return false
end
emu.register_menu(menu_callback, menu_populate, "System shutdown...")
end
return exports

10
shutdown/plugin.json Normal file
View File

@ -0,0 +1,10 @@
{
"plugin": {
"name": "shutdown",
"description": "Allows you to shut down a Windows system from within the MAME menu.",
"version": "0.0.1",
"author": "Michael Smith",
"type": "plugin",
"start": "true"
}
}