aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2023-01-02 17:33:38 +0530
committerAaditya Dhruv <[email protected]>2023-01-02 17:33:38 +0530
commit871034cd7eeca56c82bd3b142b264d0655afa864 (patch)
tree4ffc1415191fc7f2b85509eb01815e0122472830 /src/main.rs
parent8a01a57129de444289834777bae916e28d5a5ae8 (diff)
untested all funcs implemented
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 7eea245..ba865a8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -32,12 +32,16 @@ pub fn main() {
let mut event_pump = sdl_context.event_pump().unwrap();
//Main loop called 'running', checks for keyboard input and renders the display grid
'running: loop {
+ chip.clear_input();
for event in event_pump.poll_iter() {
match event {
Event::Quit {..} |
Event::KeyDown { keycode: Some(Keycode::Escape), .. } => {
break 'running
},
+ Event::KeyDown { keycode : Some(key), .. } => {
+ chip.feed_input(key);
+ }
_ => {}
}
}