mirror of
https://github.com/linux-msm/sk8brd.git
synced 2026-02-25 13:13:15 -08:00
main.rs: Fix the "Goodbye"
Add a condition to let the key-watching loop stop Signed-off-by: Konrad Dybcio <konradybcio@kernel.org>
This commit is contained in:
committed by
Konrad Dybcio
parent
d02d6b5ef1
commit
67fe7d0cd5
@@ -96,7 +96,7 @@ async fn main() {
|
||||
let stdin_handler = tokio::spawn(async move {
|
||||
let mut stdin = os_pipe::dup_stdin().expect("Couldn't dup stdin");
|
||||
|
||||
loop {
|
||||
while !*quit2.lock().await {
|
||||
if stdin.read(&mut key_buf).unwrap() > 0 {
|
||||
handle_keypress(key_buf[0] as char, &mut quit2).await;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user