summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Devin Acker <d@revenant1.net>2023-05-27 08:18:38 -0400
committer GitHub <noreply@github.com>2023-05-27 08:18:38 -0400
commite256b2ba3b584ac1c46787a3c45b7d041e9cf11b (patch)
treebc0f15eddeae7fa522878ff46a5ab43b35326b6b /src
parent0f032084002a58514a389d55154880bd55dfb2d5 (diff)
imagedev/midiin.cpp: fix error condition handling so midi files can be loaded again (#11280)
Diffstat (limited to 'src')
-rw-r--r--src/devices/imagedev/midiin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/imagedev/midiin.cpp b/src/devices/imagedev/midiin.cpp
index 643a5de57eb..fe99c76866e 100644
--- a/src/devices/imagedev/midiin.cpp
+++ b/src/devices/imagedev/midiin.cpp
@@ -174,13 +174,13 @@ std::pair<std::error_condition, std::string> midiin_device::call_load()
// if the parsing succeeds, schedule the start to happen at least
// 10 seconds after starting to allow the keyboards to initialize
// TODO: this should perhaps be a driver-configurable parameter?
- if (m_sequence.parse(image_core_file(), length()))
+ err = m_sequence.parse(image_core_file(), length());
+ if (!err)
{
m_sequence_start = std::max(machine().time(), attotime(10, 0));
m_timer->adjust(attotime::zero);
- return std::make_pair(std::error_condition(), std::string());
}
- return std::make_pair(image_error::UNSPECIFIED, std::string());
+ return std::make_pair(err, std::string());
}
else
{