mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 19:39:27 +00:00
Make sure that the backlight level is within the right range
This commit is contained in:
parent
7d5606085f
commit
ec88a0b3cc
@ -28,6 +28,9 @@ void backlight_init(void)
|
||||
eeconfig_init();
|
||||
}
|
||||
backlight_config.raw = eeconfig_read_backlight();
|
||||
if (backlight_config.level > BACKLIGHT_LEVELS) {
|
||||
backlight_config.level = BACKLIGHT_LEVELS;
|
||||
}
|
||||
backlight_set(backlight_config.enable ? backlight_config.level : 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user