forked from beerpsi/chuniio-yubideck
dumb
This commit is contained in:
parent
4c06e76982
commit
de021005fb
@ -180,7 +180,7 @@ pub extern "C" fn chuni_io_jvs_read_coin_counter(total: *mut u16) {
|
|||||||
let coin_pressed = (input[1] & 4) != 0;
|
let coin_pressed = (input[1] & 4) != 0;
|
||||||
|
|
||||||
if coin_pressed || unsafe { GetAsyncKeyState(CONFIGURATION.coin_key as c_int) } != 0 {
|
if coin_pressed || unsafe { GetAsyncKeyState(CONFIGURATION.coin_key as c_int) } != 0 {
|
||||||
let coin_previously_pressed = COIN_PRESSED.fetch_or(true, Ordering::Relaxed);
|
let coin_previously_pressed = COIN_PRESSED.fetch_xor(true, Ordering::Relaxed);
|
||||||
if !coin_previously_pressed {
|
if !coin_previously_pressed {
|
||||||
COIN_COUNT.fetch_add(1, Ordering::Relaxed);
|
COIN_COUNT.fetch_add(1, Ordering::Relaxed);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user