Touch input device #27
1 changed files with 2 additions and 6 deletions
|
@ -32,11 +32,7 @@ fn main() -> Result<(), LvError> {
|
||||||
|
|
||||||
// Register the input mode
|
// Register the input mode
|
||||||
let internal = Rc::clone(&latest_touch_status);
|
let internal = Rc::clone(&latest_touch_status);
|
||||||
let mut touch_screen = Pointer::new(move || {
|
let mut touch_screen = Pointer::new(move || internal.borrow().clone());
|
||||||
let input_status = internal.borrow().clone();
|
|
||||||
//println!("input_status = {:?}", input_status);
|
|
||||||
input_status
|
|
||||||
});
|
|
||||||
|
|
||||||
ui.indev_drv_register(&mut touch_screen)?;
|
ui.indev_drv_register(&mut touch_screen)?;
|
||||||
|
|
||||||
|
@ -103,7 +99,7 @@ fn main() -> Result<(), LvError> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(Duration::from_millis(50));
|
sleep(Duration::from_millis(15));
|
||||||
|
|
||||||
ui.tick_inc(loop_started.elapsed());
|
ui.tick_inc(loop_started.elapsed());
|
||||||
loop_started = Instant::now();
|
loop_started = Instant::now();
|
||||||
|
|
Loading…
Reference in a new issue