diff --git a/README.md b/README.md index 4810262..2054296 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ -# **shutdown** # +# **MAME system shutdown plugin** # Lua plugin for the MAME UI to shut down a Windows system from the menu. + +## Installation +* Create a new directory called 'shutdown' in the 'plugins' subdirectory of your MAME installation. +* Copy the files 'init.lua' and 'plugin.json' into this directory. +* Fire up MAME. + +## Usage +* Launch a machine from within MAME. +* Pull up the config menu by (by default hit TAB on keyboard). +* Select 'Plugin Options' and then 'System shutdown...'. +* Choose 'Yes' to immediately shut down the Windows based system. + +## How it works +Using the MAME Lua bindings to interact with the MAME UI this plugin just adds +a menu item that executes "shutdown /s /t 0" on the underlying operating +system (Windows). This will cause the PC to shut down gracefully without having +to leave MAME. + +I wrote this plugin because my cabinet setup doesn't have a keyboard +or mouse connected by default and I wanted a quick and dirty way to safely +shut down with my configured controls from within MAME. + +## To do +* Support other operating systems. diff --git a/shutdown/init.lua b/init.lua similarity index 88% rename from shutdown/init.lua rename to init.lua index 2968239..9e6fb92 100644 --- a/shutdown/init.lua +++ b/init.lua @@ -3,7 +3,7 @@ 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.description = "Shut down a Windows system from the MAME menu." exports.license = "The BSD 3-Clause License" exports.author = { name = "Michael Smith" } diff --git a/shutdown/plugin.json b/plugin.json similarity index 100% rename from shutdown/plugin.json rename to plugin.json