fix build macos
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
7a818c54f8
commit
c4fec2c19e
@ -537,8 +537,8 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
if position_code < 0 || platform_code < 0 {
|
if position_code < 0 || platform_code < 0 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let platform_code: KeyCode = platform_code as _;
|
let platform_code: u32 = platform_code as _;
|
||||||
let position_code: u32 = position_code as _;
|
let position_code: KeyCode = position_code as _;
|
||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
let key = rdev::key_from_code(position_code) as rdev::Key;
|
let key = rdev::key_from_code(position_code) as rdev::Key;
|
||||||
@ -554,7 +554,7 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
let event = Event {
|
let event = Event {
|
||||||
time: SystemTime::now(),
|
time: SystemTime::now(),
|
||||||
unicode: None,
|
unicode: None,
|
||||||
platform_code: platform_code as _,
|
platform_code: platform_code,
|
||||||
position_code: position_code as _,
|
position_code: position_code as _,
|
||||||
event_type: event_type,
|
event_type: event_type,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user