summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/sndmenu.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-25 01:55:53 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-25 01:55:53 +1100
commitc378ea087097d75cd7f4fb69da062048eaaae5e6 (patch)
tree0711e315d3d2a7fc74cae27f6faea01a6af37f34 /src/frontend/mame/ui/sndmenu.cpp
parent4e74563abb4c8b385baa72d0c2d5f3987fa88652 (diff)
A little more refactoring, and Coverity fixes:
* emu/ioport.h: Marked PORT_RESET deprecated. * emu/rendlay.cpp: Removed old dot matrix components. * emu/rendlay.cpp: Added warning message for reel components. * Changed a few more fruit machines to eliminate reel components; also made the reel lamps simpler and more efficient in these layouts. * emu, frontend: Fixed various errors reported by Coverity, one of which actaully breaks stuff.
Diffstat (limited to 'src/frontend/mame/ui/sndmenu.cpp')
-rw-r--r--src/frontend/mame/ui/sndmenu.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/frontend/mame/ui/sndmenu.cpp b/src/frontend/mame/ui/sndmenu.cpp
index b1842969f8f..1ee1e82e25c 100644
--- a/src/frontend/mame/ui/sndmenu.cpp
+++ b/src/frontend/mame/ui/sndmenu.cpp
@@ -45,29 +45,25 @@ menu_sound_options::menu_sound_options(mame_ui_manager &mui, render_container &c
}
//-------------------------------------------------
-// dtor
+// menu_dismissed
//-------------------------------------------------
-menu_sound_options::~menu_sound_options()
+void menu_sound_options::menu_dismissed()
{
emu_options &moptions = machine().options();
- if (strcmp(moptions.value(OSDOPTION_SOUND), m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE) != 0)
- {
+ if (strcmp(moptions.value(OSDOPTION_SOUND), m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE))
moptions.set_value(OSDOPTION_SOUND, m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE, OPTION_PRIORITY_CMDLINE);
- }
+
if (moptions.bool_value(OPTION_COMPRESSOR) != m_compressor)
- {
moptions.set_value(OPTION_COMPRESSOR, m_compressor, OPTION_PRIORITY_CMDLINE);
- }
+
if (moptions.int_value(OPTION_SAMPLERATE) != m_sound_rate[m_cur_rates])
- {
moptions.set_value(OPTION_SAMPLERATE, m_sound_rate[m_cur_rates], OPTION_PRIORITY_CMDLINE);
- }
+
if (moptions.bool_value(OPTION_SAMPLES) != m_samples)
- {
moptions.set_value(OPTION_SAMPLES, m_samples, OPTION_PRIORITY_CMDLINE);
- }
+
}
//-------------------------------------------------