diff options
author | Chris Xiong <chirs241097@gmail.com> | 2024-01-14 00:57:23 -0500 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2024-01-14 00:57:23 -0500 |
commit | 7830db71fa0160d7f40ea9b4650003019c2ff50c (patch) | |
tree | 27f055fd36a64ea76a74587caa22eed617147c03 /core/qmpmidiplay.cpp | |
parent | f7def0d883fa5cab62ef61b40b9f857245be8e6c (diff) | |
download | QMidiPlayer-7830db71fa0160d7f40ea9b4650003019c2ff50c.tar.xz |
Fixes for channels window and simple visualization.
a) Channel status light doesn't blink in release builds.
b) Simple visualization shows blank channel info when opened.
Diffstat (limited to 'core/qmpmidiplay.cpp')
-rw-r--r-- | core/qmpmidiplay.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index 113045f..431c16a 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -20,8 +20,10 @@ bool CMidiPlayer::processEvent(const SEvent *e) if (eventHandlerCB[i]) eventHandlerCB[i]->callBack((void *)&fe, eventHandlerCBuserdata[i]); for (auto i = event_handlers.begin(); i != event_handlers.end(); ++i) - if (!std::get<2>(i->second)) - std::get<0>(i->second)((void *)e, std::get<1>(i->second)); + { + auto [f, d, p] = i->second; + if (!p) f((void *)e, d); + } uint8_t ch = e->type & 0x0F; if ((e->type & 0xF0) < 0xF0) levtt[ch] = std::chrono::system_clock::now(); |