feat(core/bootloader): remove different logo color when firmware present

pull/2879/head
tychovrahe 1 year ago committed by matejcik
parent ae9960ca61
commit 7e96b96d00

@ -205,9 +205,7 @@ void ui_screen_done(uint8_t restart_seconds, secbool full_redraw) {
screen_install_success(str, initial_setup, full_redraw);
}
void ui_screen_boot_empty(bool firmware_present, bool fading) {
screen_boot_empty(firmware_present, fading);
}
void ui_screen_boot_empty(bool fading) { screen_boot_empty(fading); }
// error UI
void ui_screen_fail(void) { screen_install_fail(); }

@ -66,7 +66,7 @@ void ui_fadein(void);
void ui_fadeout(void);
void ui_set_initial_setup(bool initial);
void ui_screen_boot_empty(bool firmware_present, bool fading);
void ui_screen_boot_empty(bool fading);
// clang-format off
#define INPUT_CANCEL 0x01 // Cancel button

@ -195,7 +195,7 @@ static usb_result_t bootloader_usb_loop(const vendor_header *const vhdr,
hal_delay(1000);
usb_stop();
usb_deinit();
ui_screen_boot_empty(true, true);
ui_screen_boot_empty(true);
return CONTINUE;
}
break;
@ -320,7 +320,7 @@ int bootloader_main(void) {
display_set_little_endian();
#endif
ui_screen_boot_empty(firmware_present == sectrue, false);
ui_screen_boot_empty(false);
#ifdef USE_TOUCH
touch_power_on();
@ -419,7 +419,7 @@ int bootloader_main(void) {
screen = SCREEN_INTRO;
}
if (ui_result == 2) { // reboot
ui_screen_boot_empty(true, true);
ui_screen_boot_empty(true);
continue_to_firmware = true;
}
if (ui_result == 3) { // wipe

@ -28,4 +28,4 @@ uint32_t screen_install_success(const char* reboot_msg, bool initial_setup,
uint32_t screen_install_fail(void);
void screen_welcome_model(void);
void screen_welcome(void);
void screen_boot_empty(bool firmware_present, bool fading);
void screen_boot_empty(bool fading);

@ -37,9 +37,7 @@ use crate::{
welcome::Welcome,
},
component::{Button, ResultScreen},
theme::{
BACKLIGHT_DIM, BACKLIGHT_NORMAL, BLACK, FG, GREY_DARK, TEXT_ERROR_HIGHLIGHT, WHITE,
},
theme::{BACKLIGHT_DIM, BACKLIGHT_NORMAL, BLACK, FG, TEXT_ERROR_HIGHLIGHT, WHITE},
},
util::{from_c_array, from_c_str},
},
@ -391,17 +389,14 @@ extern "C" fn screen_wipe_fail() {
}
#[no_mangle]
extern "C" fn screen_boot_empty(firmware_present: bool, fading: bool) {
extern "C" fn screen_boot_empty(fading: bool) {
if fading {
fadeout();
}
let fg = if firmware_present { GREY_DARK } else { WHITE };
let bg = if firmware_present {
BLACK
} else {
WELCOME_COLOR
};
let fg = WHITE;
let bg = BLACK;
display::rect_fill(constant::screen(), bg);
let icon = Icon::new(LOGO_EMPTY);
icon.draw(Point::new(screen().center().x, 48), TOP_CENTER, fg, bg);

Loading…
Cancel
Save