diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-06 22:44:29 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-06 22:44:29 +0200 |
| commit | 83e5edac2cde5630a6acb26f7e1135f1b933db9a (patch) | |
| tree | e54f349b2c9457835006357781cd2080c79bb5ea | |
| parent | 9c685d5b6ca1686f944fb239ec89511f24801d44 (diff) | |
| download | tools.nes-83e5edac2cde5630a6acb26f7e1135f1b933db9a.tar.gz tools.nes-83e5edac2cde5630a6acb26f7e1135f1b933db9a.zip | |
vnf: don't flip the given joypad inputs
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à <mssola@mssola.com>
| -rw-r--r-- | lib/vnf/src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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(()) } |
