From 6aa3840d181d86e11b9b77d76a475b9a228bde6f Mon Sep 17 00:00:00 2001 From: cracyc Date: Fri, 11 Sep 2020 20:01:01 -0500 Subject: [PATCH] luaengine: add ioport():type_seq --- src/frontend/mame/luaengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 022d88f6515..8e7ad2665be 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -1949,6 +1949,7 @@ void lua_engine::initialize() * * ioport:count_players() - get count of player controllers * ioport:type_group(type, player) + * ioport:type_seq(type, player, seqtype) - get input sequence for ioport type/player * * ioport.ports[] - ioports table (k=tag, v=ioport_port) */ @@ -1965,6 +1966,9 @@ void lua_engine::initialize() port_table[port.second->tag()] = port.second.get(); return port_table; })); + ioport_manager_type.set("type_seq", [](ioport_manager &m, ioport_type type, int player, input_seq_type seqtype) { + return sol::make_user(m.type_seq(type, player, seqtype)); + }); sol().registry().set_usertype("ioport", ioport_manager_type);