mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
plugins: Work around menu not remembering selection when ref is nullptr.
This commit is contained in:
parent
ac9d1301cb
commit
7cc9836017
@ -17,6 +17,7 @@ function timer.startplugin()
|
||||
|
||||
local reference = 0
|
||||
local lastupdate
|
||||
local highlight -- hacky - workaround for the menu not remembering the selected item if its ref is nullptr
|
||||
|
||||
|
||||
local function sectohms(time)
|
||||
@ -38,7 +39,7 @@ function timer.startplugin()
|
||||
{ _p("plugin-timer", "Current time"), sectohms(time), "off" },
|
||||
{ _p("plugin-timer", "Total time"), sectohms(total), "off" },
|
||||
{ _p("plugin-timer", "Play Count"), play_count, "off" } },
|
||||
nil,
|
||||
highlight,
|
||||
"idle"
|
||||
end
|
||||
|
||||
@ -47,6 +48,7 @@ function timer.startplugin()
|
||||
reference = reference ~ 1
|
||||
return true
|
||||
end
|
||||
highlight = index
|
||||
return os.time() > lastupdate
|
||||
end
|
||||
|
||||
|
@ -430,12 +430,8 @@ void laserbas_state::laserbas(machine_config &config)
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "speaker").front_center();
|
||||
DAC_4BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
DAC_4BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
DAC_4BIT_R2R(config, m_dac[2], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
DAC_4BIT_R2R(config, m_dac[3], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
DAC_4BIT_R2R(config, m_dac[4], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
DAC_4BIT_R2R(config, m_dac[5], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
for (auto &dac : m_dac)
|
||||
DAC_4BIT_R2R(config, dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user