summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
authorGravatarGravatar npwoods <npwoods@mess.org>2019-08-21 09:28:44 -0400
committerGravatarGravatar npwoods <npwoods@mess.org>2019-08-21 09:28:44 -0400
commitae2cc6853d935d3daeadd84b0b740af82ea9c41e (patch)
treea253bcff25ee9a9a2ec79abd826392cee6175943 /src/frontend
parent5476dcc020c430eb4bc25b5df27ec8156b0ba1b1 (diff)
Extracting input sequence cleaning logic into an seq_clean() function
and exposing to LUA
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/luaengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 356c6a73ab6..688dca7aa44 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -2027,6 +2027,7 @@ void lua_engine::initialize()
* input:seq_pressed(seq) - get pressed state for input_seq
* input:seq_to_tokens(seq) - get KEYCODE_* string tokens for seq
* input:seq_name(seq) - get seq friendly name
+ * input:seq_clean(seq) - clean the seq and remove invalid elements
* input:seq_poll_start(class, [opt] start_seq) - start polling for input_item_class passed as string
* (switch/abs[olute]/rel[ative]/max[imum])
* input:seq_poll() - poll once, returns true if input was fetched
@@ -2043,6 +2044,7 @@ void lua_engine::initialize()
"seq_pressed", [](input_manager &input, sol::user<input_seq> seq) { return input.seq_pressed(seq); },
"seq_to_tokens", [](input_manager &input, sol::user<input_seq> seq) { return input.seq_to_tokens(seq); },
"seq_name", [](input_manager &input, sol::user<input_seq> seq) { return input.seq_name(seq); },
+ "seq_clean", [](input_manager &input, sol::user<input_seq> seq) { input_seq cleaned_seq = input.seq_clean(seq); return sol::make_user(cleaned_seq); },
"seq_poll_start", [](input_manager &input, const char *cls_string, sol::object seq) {
input_item_class cls;
if (!strcmp(cls_string, "switch"))