From de021005fb24055ae94234f9f3655448122e4fa5 Mon Sep 17 00:00:00 2001 From: beerpsi Date: Tue, 26 Dec 2023 12:36:44 +0700 Subject: [PATCH] dumb --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 6a1a828..fac3d2c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -180,7 +180,7 @@ pub extern "C" fn chuni_io_jvs_read_coin_counter(total: *mut u16) { let coin_pressed = (input[1] & 4) != 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 { COIN_COUNT.fetch_add(1, Ordering::Relaxed); }