summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-05-01 22:44:27 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2020-05-02 16:17:34 +0200
commit8b8205994bf0f4b0f427c2268182d7c958670550 (patch)
tree4b8ba00bf95ef3923d1688d7835f8ca247d5a259 /src/drumgizmo.cc
parentd9c671d14dacf3d7c02305df9b7d5fba67357a55 (diff)
Add default kit/map functionality for config file.
For this I introduced a new config file called drumgizmo.conf.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 3af5cbc..ca91c12 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -55,6 +55,16 @@ DrumGizmo::DrumGizmo(Settings& settings,
loader.init();
setSamplerate(44100.0f, settings.resampling_quality.load());
settings_getter.audition_counter.hasChanged(); // Reset audition_counter
+
+ config.load();
+ if(config.defaultMidimap != "" && settings.midimap_file.load() == "")
+ {
+ settings.midimap_file.store(config.defaultMidimap);
+ }
+ if(config.defaultKit != "" && settings.drumkit_file.load() == "")
+ {
+ settings.drumkit_file.store(config.defaultKit);
+ }
}
DrumGizmo::~DrumGizmo()