diff options
author | 2024-03-01 05:06:54 +1100 | |
---|---|---|
committer | 2024-03-01 05:06:54 +1100 | |
commit | f28fe7db31dfa205e202889fda6300434f3c0387 (patch) | |
tree | 894b3262290442d33b625f318fad25e714ef2505 /src/devices/imagedev/midiout.cpp | |
parent | 3191b41313165e3f6c302107cf1a691e9d752b04 (diff) |
osd: Cleaned up MIDI and network interfaces a little more.
Diffstat (limited to 'src/devices/imagedev/midiout.cpp')
-rw-r--r-- | src/devices/imagedev/midiout.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/devices/imagedev/midiout.cpp b/src/devices/imagedev/midiout.cpp index 89ac4872332..67efce46f93 100644 --- a/src/devices/imagedev/midiout.cpp +++ b/src/devices/imagedev/midiout.cpp @@ -10,8 +10,10 @@ #include "emu.h" #include "midiout.h" + #include "osdepend.h" + /*************************************************************************** IMPLEMENTATION ***************************************************************************/ @@ -57,11 +59,9 @@ void midiout_device::device_reset() std::pair<std::error_condition, std::string> midiout_device::call_load() { - m_midi = machine().osd().create_midi_device(); - - if (!m_midi->open_output(filename())) + m_midi = machine().osd().create_midi_output(filename()); + if (!m_midi) { - m_midi.reset(); return std::make_pair(image_error::UNSPECIFIED, std::string()); } @@ -74,11 +74,7 @@ std::pair<std::error_condition, std::string> midiout_device::call_load() void midiout_device::call_unload() { - if (m_midi) - { - m_midi->close(); - m_midi.reset(); - } + m_midi.reset(); } void midiout_device::rcv_complete() // Rx completed receiving byte |