mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-26 05:06:42 +00:00
Make sure backlight is in the range 0-100
This commit is contained in:
parent
ec88a0b3cc
commit
086aad0d7e
@ -302,7 +302,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||
if (g->g.Backlight == (unsigned)g->p.ptr)
|
||||
return;
|
||||
unsigned val = (unsigned)g->p.ptr;
|
||||
g->g.Backlight = val > 255 ? 255 : val;
|
||||
g->g.Backlight = val > 100 ? 100 : val;
|
||||
g->flags |= GDISP_FLG_NEEDFLUSH;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user