From c4f9ff9790382c1c5b99a2ffbb2a14e04d4c7cea Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 3 Apr 2022 02:53:19 +1000 Subject: -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. --- src/frontend/mame/luaengine_input.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/frontend/mame/luaengine_input.cpp') 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 player) + { + if (!player) + player = 0; + return im.type_seq(type, *player); + }, [] (ioport_manager &im, input_type_entry const &type, std::optional 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 player, std::optional seq_type_string, input_seq const &seq) -- cgit v1.2.3-70-g09d2