Store key instead of button in pressed lists

This commit is contained in:
Dorota Czaplejewicz
2019-08-29 11:43:54 +00:00
parent 132435a9c8
commit 6c0a642abf
5 changed files with 82 additions and 57 deletions

View File

@ -47,6 +47,13 @@ pub mod c {
unsafe { key.unwrap() }; // reference dropped
}
/// Compares pointers to the data
#[no_mangle]
pub extern "C"
fn squeek_key_equal(key: CKeyState, key2: CKeyState) -> u32 {
return Rc::ptr_eq(&key.clone_ref(), &key2.clone_ref()) as u32
}
#[no_mangle]
pub extern "C"
fn squeek_key_is_pressed(key: CKeyState) -> u32 {