mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
clean up some warnings
This commit is contained in:
parent
ed51bbc23e
commit
b31c727f81
2 changed files with 5 additions and 5 deletions
|
|
@ -654,8 +654,6 @@ pub fn tile(fb: &mut LcdFB, tile: Tile, clip: Option<Rectangle>) {
|
||||||
fb[fb_ln + last_word] = left_part | right_part;
|
fb[fb_ln + last_word] = left_part | right_part;
|
||||||
|
|
||||||
// set the dirty bit on the line
|
// set the dirty bit on the line
|
||||||
let old = fb[fb_ln + (LCD_WORDS_PER_LINE - 1)];
|
|
||||||
fb[fb_ln + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000;
|
fb[fb_ln + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000;
|
||||||
// log::info!("dirty[{}] {:x}->{:x}", fb_ln, old, fb[fb_ln + (LCD_WORDS_PER_LINE - 1)]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,7 @@ impl Modals {
|
||||||
|
|
||||||
#[cfg(feature = "ditherpunk")]
|
#[cfg(feature = "ditherpunk")]
|
||||||
const MODAL_WIDTH: u32 = 300;
|
const MODAL_WIDTH: u32 = 300;
|
||||||
|
#[allow(dead_code)]
|
||||||
#[cfg(feature = "ditherpunk")]
|
#[cfg(feature = "ditherpunk")]
|
||||||
const MODAL_HEIGHT: u32 = 370;
|
const MODAL_HEIGHT: u32 = 370;
|
||||||
/// this blocks until the image has been dismissed.
|
/// this blocks until the image has been dismissed.
|
||||||
|
|
@ -203,11 +204,11 @@ impl Modals {
|
||||||
pub fn show_image(&self, img: &Img) -> Result<(), xous::Error> {
|
pub fn show_image(&self, img: &Img) -> Result<(), xous::Error> {
|
||||||
self.lock();
|
self.lock();
|
||||||
// resize and/or rotate
|
// resize and/or rotate
|
||||||
|
/*
|
||||||
let (modal_width, modal_height) = (Modals::MODAL_WIDTH as f32, Modals::MODAL_HEIGHT as f32);
|
let (modal_width, modal_height) = (Modals::MODAL_WIDTH as f32, Modals::MODAL_HEIGHT as f32);
|
||||||
let (w, h, _) = img.size();
|
let (w, h, _) = img.size();
|
||||||
let (img_width, img_height) = (w as f32, h as f32);
|
let (img_width, img_height) = (w as f32, h as f32);
|
||||||
|
|
||||||
/*
|
|
||||||
let portrait_scale = (modal_width / img_width).min(modal_height / img_height);
|
let portrait_scale = (modal_width / img_width).min(modal_height / img_height);
|
||||||
let landscape_scale = (modal_width / img_height).min(modal_height / img_width);
|
let landscape_scale = (modal_width / img_height).min(modal_height / img_width);
|
||||||
let mut rotate = false;
|
let mut rotate = false;
|
||||||
|
|
@ -229,7 +230,7 @@ impl Modals {
|
||||||
let (bm_width, bm_height) = bm.size();
|
let (bm_width, bm_height) = bm.size();
|
||||||
let (bm_width, bm_height) = (bm_width as u32, bm_height as u32);
|
let (bm_width, bm_height) = (bm_width as u32, bm_height as u32);
|
||||||
*/
|
*/
|
||||||
let mut bm = Bitmap::from(img.clone());
|
let bm = Bitmap::from(img.clone());
|
||||||
|
|
||||||
// center image in modal
|
// center image in modal
|
||||||
/*
|
/*
|
||||||
|
|
@ -243,7 +244,7 @@ impl Modals {
|
||||||
if t >= tiles.len() {
|
if t >= tiles.len() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut copy = tile.clone();
|
let copy = tile.clone();
|
||||||
//copy.translate(center);
|
//copy.translate(center);
|
||||||
tiles[t] = Some(copy);
|
tiles[t] = Some(copy);
|
||||||
}
|
}
|
||||||
|
|
@ -259,6 +260,7 @@ impl Modals {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[cfg(feature = "ditherpunk")]
|
#[cfg(feature = "ditherpunk")]
|
||||||
fn resize_image(img: Img, scale: f32) -> Img {
|
fn resize_image(img: Img, scale: f32) -> Img {
|
||||||
let (w, h, _) = img.size();
|
let (w, h, _) = img.size();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue