better rgba
This commit is contained in:
@@ -508,7 +508,11 @@ impl Computer {
|
|||||||
self.ram[addr / 4] = self[reg1];
|
self.ram[addr / 4] = self[reg1];
|
||||||
} else if addr <= 0x00ff_ffff + 480 * 640 * 4 {
|
} else if addr <= 0x00ff_ffff + 480 * 640 * 4 {
|
||||||
let buf_addr = (addr - 0x0100_0000) / 4;
|
let buf_addr = (addr - 0x0100_0000) / 4;
|
||||||
let dat = self[reg1] & 0x00FF_FFFF;
|
let dat = if cfg!(feature = "rgba") {
|
||||||
|
self[reg1]
|
||||||
|
} else {
|
||||||
|
self[reg1] & 0x00FF_FFFF
|
||||||
|
};
|
||||||
(&SHARED.screen_buf[buf_addr])
|
(&SHARED.screen_buf[buf_addr])
|
||||||
.store(dat, std::sync::atomic::Ordering::Relaxed);
|
.store(dat, std::sync::atomic::Ordering::Relaxed);
|
||||||
} else if addr == 0x0120_1000 {
|
} else if addr == 0x0120_1000 {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ use winit::application::ApplicationHandler;
|
|||||||
use winit::dpi::LogicalSize;
|
use winit::dpi::LogicalSize;
|
||||||
use winit::event::WindowEvent;
|
use winit::event::WindowEvent;
|
||||||
use winit::event_loop::EventLoop;
|
use winit::event_loop::EventLoop;
|
||||||
use winit::platform::modifier_supplement::KeyEventExtModifierSupplement;
|
|
||||||
use winit::platform::scancode::PhysicalKeyExtScancode;
|
use winit::platform::scancode::PhysicalKeyExtScancode;
|
||||||
use winit::window::Window;
|
use winit::window::Window;
|
||||||
|
|
||||||
@@ -59,7 +58,8 @@ impl<'a> ApplicationHandler for App<'a> {
|
|||||||
Window::default_attributes()
|
Window::default_attributes()
|
||||||
.with_title("bisare screen")
|
.with_title("bisare screen")
|
||||||
.with_min_inner_size(size)
|
.with_min_inner_size(size)
|
||||||
.with_maximized(true),
|
.with_maximized(true)
|
||||||
|
.with_transparent(true),
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
@@ -92,6 +92,7 @@ impl<'a> ApplicationHandler for App<'a> {
|
|||||||
print!("Keyboard event: ");
|
print!("Keyboard event: ");
|
||||||
#[cfg(feature = "rich_keyboard")]
|
#[cfg(feature = "rich_keyboard")]
|
||||||
{
|
{
|
||||||
|
use winit::platform::modifier_supplement::KeyEventExtModifierSupplement;
|
||||||
let kb0 = key_event.text_with_all_modifiers().map_or(u32::MAX, |s| {
|
let kb0 = key_event.text_with_all_modifiers().map_or(u32::MAX, |s| {
|
||||||
s.as_bytes()
|
s.as_bytes()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user