Simplify mouse button tracking

delete the shitcodes
This commit is contained in:
Reinis Mazeiks committed 2022-05-07 16:11:48 +03:00
1 parent 285a6d080b
commit 81d3c990bf
3 files changed
+55 -64

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ fn app(cx: Scope) -> Element {
}
fn get_brightness(m: Arc<MouseData>) -> i32 {
let b: i32 = m.buttons.count_ones().try_into().unwrap();
let b: i32 = m.held_buttons().len().try_into().unwrap();
127 * b
}