fix hosted mode regression

This commit is contained in:
bunnie 2026-01-29 00:08:56 +08:00
parent ec630d3a2d
commit 1d3f264be4

View file

@ -32,6 +32,7 @@ pub fn claim_main_thread(f: impl FnOnce(MainThreadToken) -> Never + Send + 'stat
let (send, recv) = mpsc::sync_channel(0);
// Call the closure on a fake main thread
#[allow(unreachable_code)]
let fake_main_thread = std::thread::Builder::new()
.name("wrapped_main".into())
.spawn(move || f(MainThreadToken(send)))
@ -175,6 +176,9 @@ impl FrameBuffer for XousDisplay {
fb[clip_y * LCD_WORDS_PER_LINE + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000;
}
/// Wrapper for compatibility sake
unsafe fn put_pixel_unchecked(&mut self, p: Point, color: ColorNative) { self.put_pixel(p, color); }
/// Retrieves a pixel value from the frame buffer; returns None if the point is out of bounds.
///
/// Note: this has not be carefully tested as this API is not used by the legacy code base.