diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-26 15:18:22 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-26 15:18:22 +0200 |
commit | 813d802443679a6f937a13680bc0ec3fb11a96b6 (patch) | |
tree | 832080cb77616941ede4572fcf845eb4281f59ba /src/drumgizmo.cc | |
parent | 605dee007b10fbca1a03b0a2b604b4e999ad7c0f (diff) |
Add MidimapLoadStatus Message.
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; |