瀏覽代碼

[Keyboard] Fix compile issues for OLKB Default keymaps (#6751)

Drashna Jaelre 5 年之前
父節點
當前提交
37c2996137
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      keyboards/planck/keymaps/default/keymap.c

+ 4 - 0
keyboards/planck/keymaps/default/keymap.c

@@ -292,7 +292,9 @@ void encoder_update(bool clockwise) {
 void dip_switch_update_user(uint8_t index, bool active) {
     switch (index) {
         case 0: {
+#ifdef AUDIO_ENABLE
             static bool play_sound = false;
+#endif
             if (active) {
 #ifdef AUDIO_ENABLE
                 if (play_sound) { PLAY_SONG(plover_song); }
@@ -304,7 +306,9 @@ void dip_switch_update_user(uint8_t index, bool active) {
 #endif
                 layer_off(_ADJUST);
             }
+#ifdef AUDIO_ENABLE
             play_sound = true;
+#endif
             break;
         }
         case 1: