From 7830db71fa0160d7f40ea9b4650003019c2ff50c Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 14 Jan 2024 00:57:23 -0500 Subject: 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. --- core/qmpmidiplay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/qmpmidiplay.cpp') 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(); -- cgit v1.2.3