diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drumgizmo.cc | 11 | ||||
-rw-r--r-- | src/drumgizmo.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 83bd747..32ad66e 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -204,8 +204,15 @@ void DrumGizmo::handleEngineEvents() case Message::EngineSettingsMessage: { DEBUG(msg, "got EngineSettingsMessage message."); + + std::string mmapfile; + if(ie->isMidiEngine()) { + AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; + mmapfile = aim->midimapFile(); + } + EngineSettingsMessage *msg = new EngineSettingsMessage(); - msg->midimapfile = midimapfile; + msg->midimapfile = mmapfile; msg->midimap_loaded = true; msg->drumkitfile = drumkitfile(); msg->drumkit_loaded = true; @@ -586,7 +593,7 @@ bool DrumGizmo::setConfigString(std::string cfg) } std::string newmidimap = p.value("midimapfile"); - if(midimapfile != newmidimap && newmidimap != "") { + if(newmidimap != "") { //midimapfile = newmidimap; LoadMidimapMessage *msg = new LoadMidimapMessage(); msg->midimapfile = newmidimap; diff --git a/src/drumgizmo.h b/src/drumgizmo.h index c03fd95..ffb9b07 100644 --- a/src/drumgizmo.h +++ b/src/drumgizmo.h @@ -67,7 +67,6 @@ public: std::string configString(); bool setConfigString(std::string cfg); - std::string midimapfile; std::string kitfile; /* |