diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-23 21:36:16 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-23 21:36:16 +0200 |
commit | 567062ecd36338358e698dda9de8b79fb692c432 (patch) | |
tree | 3fe106c94db08bba129968770865bc20b99a6e89 /src/drumgizmo.cc | |
parent | eafdef4a5e7bb6cbed75b17a38a9b0e30c6e51a6 (diff) |
Fix midifile-no-stored bug.
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 b07e675..83bd747 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -469,10 +469,16 @@ float str2float(std::string a) std::string DrumGizmo::configString() { + std::string mmapfile; + if(ie->isMidiEngine()) { + AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; + mmapfile = aim->midimapFile(); + } + return "<config>\n" " <value name=\"drumkitfile\">" + kitfile + "</value>\n" - " <value name=\"midimapfile\">" + midimapfile + "</value>\n" + " <value name=\"midimapfile\">" + mmapfile + "</value>\n" " <value name=\"enable_velocity_modifier\">" + bool2str(Conf::enable_velocity_modifier) + "</value>\n" " <value name=\"velocity_modifier_falloff\">" + @@ -581,9 +587,9 @@ bool DrumGizmo::setConfigString(std::string cfg) std::string newmidimap = p.value("midimapfile"); if(midimapfile != newmidimap && newmidimap != "") { - midimapfile = newmidimap; + //midimapfile = newmidimap; LoadMidimapMessage *msg = new LoadMidimapMessage(); - msg->midimapfile = midimapfile; + msg->midimapfile = newmidimap; sendEngineMessage(msg); } |