1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

fix(core): fixed blank display delay on startup when display orientation is set to other than north

This commit is contained in:
tychovrahe 2024-01-05 15:58:11 +01:00 committed by TychoVrahe
parent 988ba0b74c
commit ef5c743c35
2 changed files with 20 additions and 6 deletions

View File

@ -0,0 +1 @@
[T2T1] Fixed blank display delay on startup when display orientation is set to other than north

View File

@ -42,15 +42,28 @@ async def bootscreen() -> None:
Allowing all of them before returning. Allowing all of them before returning.
""" """
lockscreen = Lockscreen(label=storage.device.get_label(), bootscreen=True) lockscreen = Lockscreen(label=storage.device.get_label(), bootscreen=True)
ui.display.orientation(storage.device.get_rotation())
while True: while True:
try: try:
if can_lock_device(): if can_lock_device():
enforce_welcome_screen_duration() enforce_welcome_screen_duration()
ui.backlight_fade(ui.style.BACKLIGHT_DIM)
ui.display.orientation(storage.device.get_rotation())
await lockscreen await lockscreen
await verify_user_pin()
storage.init_unlocked()
allow_all_loader_messages()
return
else:
await verify_user_pin() await verify_user_pin()
storage.init_unlocked() storage.init_unlocked()
enforce_welcome_screen_duration() enforce_welcome_screen_duration()
rotation = storage.device.get_rotation()
if rotation != ui.display.orientation():
# there is a slight delay before next screen is shown,
# so we don't fade unless there is a change of orientation
ui.backlight_fade(ui.style.BACKLIGHT_DIM)
ui.display.orientation(rotation)
allow_all_loader_messages() allow_all_loader_messages()
return return
except wire.PinCancelled: except wire.PinCancelled: