Skip to content

Commit 72b716f

Browse files
committed
fix(core): remove unnecessary fading
[no changelog]
1 parent 0ad6c36 commit 72b716f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/embed/io/display/display_utils.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
void display_fade(int start, int end, int delay) {
2626
#ifdef USE_BACKLIGHT
27+
if (display_get_backlight() == end) {
28+
return;
29+
}
2730
for (int i = 0; i < 100; i++) {
2831
display_set_backlight(start + i * (end - start) / 100);
2932
hal_delay(delay / 100);

core/embed/rust/src/ui/layout/simplified.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub fn run(frame: &mut impl Component<Msg = impl ReturnToC>) -> u32 {
124124
pub fn show(frame: &mut impl Component, fading: bool) {
125125
frame.place(ModelUI::SCREEN);
126126

127-
if fading {
127+
if fading && display::backlight() > 0 {
128128
ModelUI::fadeout()
129129
};
130130

0 commit comments

Comments
 (0)