1786018745
This commit is contained in:
@@ -74,9 +74,16 @@ impl Platform for Trekstor {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.input.is_down(KeyCode::BTN_TOUCH) {
|
||||||
|
self.window
|
||||||
|
.try_dispatch_event(WindowEvent::PointerMoved {
|
||||||
|
position: LogicalPosition::new(ctx.input.x as f32, ctx.input.y as f32),
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
self.window.draw_if_needed(|renderer| {
|
self.window.draw_if_needed(|renderer| {
|
||||||
dbg!("Rendering");
|
renderer.render(&mut buffer1, window_width as usize);
|
||||||
dbg!(renderer.render(&mut buffer1, window_width as usize));
|
|
||||||
|
|
||||||
for (i, px) in buffer1.into_iter().enumerate() {
|
for (i, px) in buffer1.into_iter().enumerate() {
|
||||||
let x = (i % window_width as usize) as u32;
|
let x = (i % window_width as usize) as u32;
|
||||||
@@ -84,7 +91,6 @@ impl Platform for Trekstor {
|
|||||||
|
|
||||||
let pixel = Rgb8Pixel::from(px);
|
let pixel = Rgb8Pixel::from(px);
|
||||||
let c = Color::from((pixel.r, pixel.g, pixel.b, 255));
|
let c = Color::from((pixel.r, pixel.g, pixel.b, 255));
|
||||||
// println!("{x}x{y}: {:?}", c);
|
|
||||||
|
|
||||||
ctx.screen.framebuffer.set_pixel(x, y, c);
|
ctx.screen.framebuffer.set_pixel(x, y, c);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user