Initial commit
This commit is contained in:
commit
823c7f97a9
27
shutdown/init.lua
Normal file
27
shutdown/init.lua
Normal 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
10
shutdown/plugin.json
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user