From 83e5edac2cde5630a6acb26f7e1135f1b933db9a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 6 Sep 2026 22:44:29 +0200 Subject: vnf: don't flip the given joypad inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I am not sure from where I got this bit flipping part, but I believe things worked because of another bug (see 9c685d5b6ca1 ("vnf: also set the carry on a zero compare")). Fixes: ad77503d9533 ("vnf: add support for standard joypads") Signed-off-by: Miquel Sabaté Solà --- lib/vnf/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/vnf') diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs index 6c0a6f2..715a264 100644 --- a/lib/vnf/src/lib.rs +++ b/lib/vnf/src/lib.rs @@ -242,11 +242,7 @@ impl Joypad { return Err("no more input on the queue".to_string()); } self.reads = 0; - - // NOTE: flip the bits as the consumer actually expects a 1 for - // unpressed and a 0 for pressed. This is not done directly in the - // 'BUTTON_*' constants out of convenience from the API point of view. - self.shift = !self.values.remove(0); + self.shift = self.values.remove(0); Ok(()) } -- cgit v1.2.3