work around white screen issue on Windows 11 (#538)

This is the work-around suggested at

https://github.com/emoon/rust_minifb/issues/351

until a new release is tagged.
This commit is contained in:
bunnie 2024-05-10 00:33:59 +08:00
parent 12891d6af1
commit 52e5d21e6f
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ cramium-hal = { path = "../../libs/cramium-hal", optional = true, features = [
] }
[target.'cfg(any(windows,unix))'.dependencies]
minifb = "0.23.0"
minifb = { git = "https://github.com/emoon/rust_minifb.git", rev = "633e6cd4f8f55fd9cbedc461976dde0f408bea35" }
[features]
cramium-soc = [

View file

@ -16,7 +16,7 @@ pub const FB_WIDTH_PIXELS: usize = WIDTH as usize;
pub const FB_LINES: usize = HEIGHT as usize;
pub const FB_SIZE: usize = WIDTH_WORDS * HEIGHT as usize; // 44 bytes by 536 lines
const MAX_FPS: u64 = 60;
const MAX_FPS: usize = 60;
const DARK_COLOUR: u32 = 0xB5B5AD;
const LIGHT_COLOUR: u32 = 0x1B1B19;
@ -166,7 +166,7 @@ impl MinifbThread {
});
// Limit the maximum update rate
window.limit_update_rate(Some(std::time::Duration::from_micros(1000 * 1000 / MAX_FPS)));
window.set_target_fps(MAX_FPS);
let xns = xous_names::XousNames::new().unwrap();
let kbd = keyboard::Keyboard::new(&xns).expect("GFX|hosted can't connect to KBD for emulation");