Skip to content

Commit

Permalink
fix(core/rust): fix build with old rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
matejcik committed Aug 28, 2024
1 parent 155c3b2 commit 6acc529
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions core/embed/rust/src/ui/model_tr/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{geometry::Rect, shape::display::fb_display, UIFeaturesCommon};
use super::{geometry::Rect, UIFeaturesCommon};

#[cfg(feature = "bootloader")]
pub mod bootloader;
Expand All @@ -14,7 +14,8 @@ pub mod theme;
pub struct ModelTRFeatures {}

impl UIFeaturesCommon for ModelTRFeatures {
type Display = fb_display::Mono8;
#[cfg(feature = "new_rendering")]
type Display = crate::ui::shape::display::fb_display::Mono8;

const SCREEN: Rect = constant::SCREEN;

Expand Down
5 changes: 3 additions & 2 deletions core/embed/rust/src/ui/model_tt/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{geometry::Rect, shape::display::nofb_rgb565::NoFbRgb565, UIFeaturesCommon};
use super::{geometry::Rect, UIFeaturesCommon};

#[cfg(feature = "bootloader")]
pub mod bootloader;
Expand All @@ -20,7 +20,8 @@ use crate::ui::{
pub struct ModelTTFeatures;

impl UIFeaturesCommon for ModelTTFeatures {
type Display = NoFbRgb565;
#[cfg(feature = "new_rendering")]
type Display = crate::ui::shape::display::nofb_rgb565::NoFbRgb565;

#[cfg(feature = "backlight")]
fn fadein() {
Expand Down
1 change: 1 addition & 0 deletions core/embed/rust/src/ui/ui_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::trezorhal::secbool::secbool;
use crate::ui::display::Color;

pub trait UIFeaturesCommon {
#[cfg(feature = "new_rendering")]
type Display: Display;

fn fadein() {}
Expand Down

0 comments on commit 6acc529

Please sign in to comment.