summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc11
1 files changed, 9 insertions, 2 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;