1786016418
This commit is contained in:
@@ -2,11 +2,9 @@ use std::rc::Rc;
|
||||
|
||||
use evdev::KeyCode;
|
||||
use linfb::shape::Color;
|
||||
use slint::LogicalPosition;
|
||||
use slint::platform::software_renderer::{MinimalSoftwareWindow, RepaintBufferType};
|
||||
use slint::platform::software_renderer::{MinimalSoftwareWindow, RepaintBufferType, Rgb565Pixel};
|
||||
use slint::platform::{Platform, WindowEvent};
|
||||
|
||||
use crate::rgba::Rgba;
|
||||
use slint::{LogicalPosition, Rgb8Pixel};
|
||||
|
||||
use self::input::InputState;
|
||||
use self::screen::Screen;
|
||||
@@ -43,10 +41,10 @@ impl Platform for Trekstor {
|
||||
let input = InputState::new(&screen);
|
||||
let mut ctx = Context { screen, input };
|
||||
|
||||
let mut buffer1 = [Rgba::from((0, 0, 0, 0)); 614400];
|
||||
let mut buffer1 = [Rgb565Pixel(0); 614400];
|
||||
|
||||
let window_width = ctx.screen.width() - 1;
|
||||
let window_height = ctx.screen.height() - 1;
|
||||
// let window_height = ctx.screen.height() - 1;
|
||||
|
||||
loop {
|
||||
ctx.input.handle_event();
|
||||
@@ -87,7 +85,9 @@ impl Platform for Trekstor {
|
||||
// // continue;
|
||||
// // }
|
||||
|
||||
dbg!(x, y, Color::from((px.r(), px.b(), px.b(), px.a())));
|
||||
let pixel = Rgb8Pixel::from(px);
|
||||
|
||||
dbg!(x, y, Color::from((pixel.r, pixel.g, pixel.b, 255)));
|
||||
|
||||
// // ctx.screen.framebuffer.set_pixel(
|
||||
// // x,
|
||||
|
||||
Reference in New Issue
Block a user