summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-04-03 02:53:19 +1000
committer Vas Crabb <vas@vastheman.com>2022-04-03 02:53:19 +1000
commitc4f9ff9790382c1c5b99a2ffbb2a14e04d4c7cea (patch)
tree80a1185e2dbed843500eda4e740dfac9f03eba1b /src/frontend/mame
parent5255f96203e4dc58ba660f74a64e6b640016a604 (diff)
-util/corealloc.h: Reduced make_unique_clear to a single variant for POD arrays.
* Enabled GCC lifetime dead store elimination optimisation. * emu/device.h: Don't pre-clear memory for drivers. Ivan Vangelista fixed at least the majority of things that crashed outright, and Robbbert initialised variables that coverity complained about. It's unlikely anything will break due to this. * sound/discrete.h: Explicitly initialise members of discrete "devices" to zero. I don't see a way around doing this in headers due to the macro soup used to build the constructors. * sound/mos6581.cpp: Moved creation of the SID core to device_start and explictly initialised members of the SID core structures. These structures are in internal headers, so they won't cause downstream recompiles. -Lua engine: Made I/O port manager type_seq a bit more tolerant of omitted arguments.
Diffstat (limited to 'src/frontend/mame')
-rw-r--r--src/frontend/mame/luaengine_input.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/frontend/mame/luaengine_input.cpp b/src/frontend/mame/luaengine_input.cpp
index e1bc99f3ed1..bb69ca4bd28 100644
--- a/src/frontend/mame/luaengine_input.cpp
+++ b/src/frontend/mame/luaengine_input.cpp
@@ -160,10 +160,20 @@ void lua_engine::initialize_input(sol::table &emu)
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
return im.type_seq(type, *player, seq_type);
},
+ [] (ioport_manager &im, ioport_type type, std::optional<int> player)
+ {
+ if (!player)
+ player = 0;
+ return im.type_seq(type, *player);
+ },
[] (ioport_manager &im, input_type_entry const &type, std::optional<char const *> seq_type_string)
{
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
return im.type_seq(type.type(), type.player(), seq_type);
+ },
+ [] (ioport_manager &im, input_type_entry const &type)
+ {
+ return im.type_seq(type.type(), type.player());
});
ioport_manager_type["set_type_seq"] = sol::overload(
[] (ioport_manager &im, ioport_type type, std::optional<int> player, std::optional<char const *> seq_type_string, input_seq const &seq)