1786015900
This commit is contained in:
@@ -45,6 +45,9 @@ impl Platform for Trekstor {
|
|||||||
|
|
||||||
let mut buffer1 = [Rgba::from((0, 0, 0, 0)); 614400];
|
let mut buffer1 = [Rgba::from((0, 0, 0, 0)); 614400];
|
||||||
|
|
||||||
|
let window_width = ctx.screen.width();
|
||||||
|
let window_height = ctx.screen.height();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
ctx.input.handle_event();
|
ctx.input.handle_event();
|
||||||
|
|
||||||
@@ -70,19 +73,19 @@ impl Platform for Trekstor {
|
|||||||
|
|
||||||
self.window.draw_if_needed(|renderer| {
|
self.window.draw_if_needed(|renderer| {
|
||||||
dbg!("Rendering");
|
dbg!("Rendering");
|
||||||
renderer.render(&mut buffer1, ctx.screen.width() as usize);
|
renderer.render(&mut buffer1, window_width as usize);
|
||||||
for (i, px) in buffer1.into_iter().enumerate() {
|
for (i, px) in buffer1.into_iter().enumerate() {
|
||||||
if i > (ctx.screen.width() as usize - 1) {
|
if i > (window_width as usize - 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let x = (i % ctx.screen.width() as usize) as u32;
|
let x = (i % window_width as usize) as u32;
|
||||||
let y = (i / ctx.screen.width() as usize) as u32;
|
let y = (i / window_width as usize) as u32;
|
||||||
|
|
||||||
if x >= ctx.screen.width() || y >= ctx.screen.height() {
|
// if x >= window_width || y >= window_height {
|
||||||
println!("Out of bounds {} {}", x, y);
|
// println!("Out of bounds {} {}", x, y);
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
dbg!(x, y, px);
|
dbg!(x, y, px);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user