diff options
author | Balz Guenat <balz.guenat@gmail.com> | 2017-08-12 12:14:33 +0200 |
---|---|---|
committer | Balz Guenat <balz.guenat@gmail.com> | 2017-08-12 12:14:33 +0200 |
commit | 430151dd51b8b0d925850ad4d52c8bae41d3c154 (patch) | |
tree | f3d13283dd812277bc30d75dff32ea16508b58c8 /quantum/quantum.c | |
parent | 175db1a549a46518c2f2511ac1624d594eb07216 (diff) | |
parent | 5ad103fa51083cb26d3516e5598b7b2a099b1521 (diff) |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# docs/faq_keymap.md
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index d1969fc5ba..aac1d07a9b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -40,13 +40,12 @@ extern backlight_config_t backlight_config; #ifndef AG_SWAP_SONG #define AG_SWAP_SONG SONG(AG_SWAP_SOUND) #endif - #ifndef DEFAULT_LAYER_SONGS - #define DEFAULT_LAYER_SONGS { } - #endif float goodbye_song[][2] = GOODBYE_SONG; float ag_norm_song[][2] = AG_NORM_SONG; float ag_swap_song[][2] = AG_SWAP_SONG; - float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; + #ifdef DEFAULT_LAYER_SONGS + float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; + #endif #endif static void do_code16 (uint16_t code, void (*f) (uint8_t)) { @@ -193,6 +192,10 @@ bool process_record_quantum(keyrecord_t *record) { // } if (!( + #if defined(KEY_LOCK_ENABLE) + // Must run first to be able to mask key_up events. + process_key_lock(&keycode, record) && + #endif process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && @@ -563,7 +566,7 @@ void send_string_with_delay(const char *str, uint8_t interval) { } void set_single_persistent_default_layer(uint8_t default_layer) { - #ifdef AUDIO_ENABLE + #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) PLAY_SONG(default_layer_songs[default_layer]); #endif eeconfig_update_default_layer(1U<<default_layer); |