mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 21:48:13 +00:00
trezor.ui.display: fix orientation/backlight calls when NOUI=1 is used
This commit is contained in:
parent
161bb90e03
commit
0012883984
@ -27,11 +27,19 @@ void display_refresh(void)
|
|||||||
|
|
||||||
int display_orientation(int degrees)
|
int display_orientation(int degrees)
|
||||||
{
|
{
|
||||||
|
if (degrees != ORIENTATION) {
|
||||||
|
if (degrees == 0 || degrees == 90 || degrees == 180 || degrees == 270) {
|
||||||
|
ORIENTATION = degrees;
|
||||||
|
}
|
||||||
|
}
|
||||||
return ORIENTATION;
|
return ORIENTATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_backlight(int val)
|
int display_backlight(int val)
|
||||||
{
|
{
|
||||||
|
if (BACKLIGHT != val && val >= 0 && val <= 255) {
|
||||||
|
BACKLIGHT = val;
|
||||||
|
}
|
||||||
return BACKLIGHT;
|
return BACKLIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user