Fix issue introduced by PR#10404 (#10559)

This commit is contained in:
a_p_u_r_o 2020-10-07 11:30:43 +09:00 committed by GitHub
parent a67b32425b
commit bc79e51990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ typedef void (*rgb_func_pointer)(void);
* *
* noinline to optimise for firmware size not speed (not in hot path) * noinline to optimise for firmware size not speed (not in hot path)
*/ */
#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) #if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES))
static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) {
if (is_shifted) { if (is_shifted) {
dec_func(); dec_func();
@ -58,7 +58,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
// Split keyboards need to trigger on key-up for edge-case issue // Split keyboards need to trigger on key-up for edge-case issue
if (!record->event.pressed) { if (!record->event.pressed) {
#endif #endif
#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) #if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES))
uint8_t shifted = get_mods() & MOD_MASK_SHIFT; uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
#endif #endif
switch (keycode) { switch (keycode) {