mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
luaengine: add ioport():type_seq
This commit is contained in:
parent
8f48f2d062
commit
6aa3840d18
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue