fix block_on runtime
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
ed5b844b77
commit
03fc91e557
@ -245,6 +245,7 @@ pub async fn setup_uinput(minx: i32, maxx: i32, miny: i32, maxy: i32) -> ResultT
|
|||||||
pub async fn update_mouse_resolution(minx: i32, maxx: i32, miny: i32, maxy: i32) -> ResultType<()> {
|
pub async fn update_mouse_resolution(minx: i32, maxx: i32, miny: i32, maxy: i32) -> ResultType<()> {
|
||||||
set_uinput_resolution(minx, maxx, miny, maxy).await?;
|
set_uinput_resolution(minx, maxx, miny, maxy).await?;
|
||||||
|
|
||||||
|
std::thread::spawn(|| {
|
||||||
if let Some(mouse) = ENIGO.lock().unwrap().get_custom_mouse() {
|
if let Some(mouse) = ENIGO.lock().unwrap().get_custom_mouse() {
|
||||||
if let Some(mouse) = mouse
|
if let Some(mouse) = mouse
|
||||||
.as_mut_any()
|
.as_mut_any()
|
||||||
@ -255,6 +256,7 @@ pub async fn update_mouse_resolution(minx: i32, maxx: i32, miny: i32, maxy: i32)
|
|||||||
log::error!("failed downcast uinput mouse");
|
log::error!("failed downcast uinput mouse");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user