summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
authormtdjr <mtdjr@users.noreply.github.com>2018-07-30 06:45:09 +0200
committerDrashna Jaelre <drashna@live.com>2018-07-30 06:45:09 +0200
commit07ab5befc738e964517dc53b645f798180f703b9 (patch)
treeebd3e581f26876a4d13e9f2f2c3d005c7526fa6f /users
parent25d757284ca2b1c0303faf5749b123a38579476a (diff)
downloadqmk_firmware-07ab5befc738e964517dc53b645f798180f703b9.tar.gz
qmk_firmware-07ab5befc738e964517dc53b645f798180f703b9.tar.xz
Keymaps: correct error in mtdjr userspace for layer_state_set_user (#3521)
* holefully correct error in mtdjr userspace for layer_state_set_user * return state and wrap rgb actions in their own conditional
Diffstat (limited to 'users')
-rw-r--r--users/mtdjr/mtdjr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/users/mtdjr/mtdjr.c b/users/mtdjr/mtdjr.c
index ac5c5911f..d8d6871a1 100644
--- a/users/mtdjr/mtdjr.c
+++ b/users/mtdjr/mtdjr.c
@@ -137,21 +137,27 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
uint32_t layer_state_set_user(uint32_t state) {
-#ifdef RGBLIGHT_ENABLE
switch (biton32(state)) {
case _RAISE:
+ #ifdef RGBLIGHT_ENABLE
rgblight_sethsv_noeeprom (240, 255, 255);
+ #endif
break;
case _LOWER:
+ #ifdef RGBLIGHT_ENABLE
rgblight_sethsv_noeeprom (0, 255, 255);
+ #endif
break;
case _ADJUST:
+ #ifdef RGBLIGHT_ENABLE
rgblight_sethsv_noeeprom (0, 0, 255);
+ #endif
break;
default:
+ #ifdef RGBLIGHT_ENABLE
rgblight_sethsv_noeeprom (RGB_HUE, 255, 255);
+ #endif
break;
}
return state;
-#endif
}