removed some debug
This commit is contained in:
BIN
sim_rs.tar.xz
BIN
sim_rs.tar.xz
Binary file not shown.
@@ -12,7 +12,6 @@ use pixels::{Error, Pixels, SurfaceTexture};
|
|||||||
use winit::dpi::LogicalSize;
|
use winit::dpi::LogicalSize;
|
||||||
use winit::event::{Event, WindowEvent};
|
use winit::event::{Event, WindowEvent};
|
||||||
use winit::event_loop::EventLoop;
|
use winit::event_loop::EventLoop;
|
||||||
use winit::keyboard::KeyCode;
|
|
||||||
use winit::platform::scancode::PhysicalKeyExtScancode;
|
use winit::platform::scancode::PhysicalKeyExtScancode;
|
||||||
use winit::window::Window;
|
use winit::window::Window;
|
||||||
use winit_input_helper::WinitInputHelper;
|
use winit_input_helper::WinitInputHelper;
|
||||||
@@ -90,12 +89,10 @@ fn main() -> Result<(), Error> {
|
|||||||
match event.state {
|
match event.state {
|
||||||
winit::event::ElementState::Pressed => {
|
winit::event::ElementState::Pressed => {
|
||||||
if let Some(val) = event.physical_key.to_scancode() {
|
if let Some(val) = event.physical_key.to_scancode() {
|
||||||
println!("key with code {val} was pressed");
|
|
||||||
kbref.store(val, std::sync::atomic::Ordering::Relaxed);
|
kbref.store(val, std::sync::atomic::Ordering::Relaxed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
winit::event::ElementState::Released => {
|
winit::event::ElementState::Released => {
|
||||||
println!("key released");
|
|
||||||
kbref.store(0, std::sync::atomic::Ordering::Relaxed)
|
kbref.store(0, std::sync::atomic::Ordering::Relaxed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user