diff options
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 8ba45f5..943e852 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -201,22 +201,28 @@ void DrumGizmo::handleEngineEvents() { AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; LoadMidimapMessage *m = (LoadMidimapMessage*)msg; - aim->loadMidiMap(m->midimapfile, kit.instruments); + bool ret = aim->loadMidiMap(m->midimapfile, kit.instruments); + + LoadStatusMessageMidimap *ls = new LoadStatusMessageMidimap(); + ls->success = ret; + sendGUIMessage(ls); } break; case Message::EngineSettingsMessage: { DEBUG(msg, "got EngineSettingsMessage message."); - + bool mmap_loaded = false; std::string mmapfile; if(ie->isMidiEngine()) { AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; mmapfile = aim->midimapFile(); + mmap_loaded = aim->isValid(); + } EngineSettingsMessage *msg = new EngineSettingsMessage(); msg->midimapfile = mmapfile; - msg->midimap_loaded = true; + msg->midimap_loaded = mmap_loaded; msg->drumkitfile = drumkitfile(); msg->drumkit_loaded = true; msg->enable_velocity_modifier = Conf::enable_velocity_modifier; |