From b5b51ae555445844d2c16c4cb59a95e39f73fa00 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 2 Jul 2025 15:12:14 +0200 Subject: [PATCH] fix: input dropping sometimes --- src/io/input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/input.c b/src/io/input.c index d853a71..593fbaf 100644 --- a/src/io/input.c +++ b/src/io/input.c @@ -69,9 +69,9 @@ int input_getdat(time_t time) { int mask = timeout_mask(time); // handle releasing of keys - mov &= ~(nmov & lmov & mask); // only remove the keys that have been pressed since lmov - lmov = mov; // set the value of lmov to the new value mov - nmov &= mov; // set nmov to only those in mov + mov &= ~(nmov & lmov & mask); // only remove the keys that have been pressed since lmov + lmov = (mov & mask) | (lmov & ~mask); // set the value of lmov to the new value mov + nmov &= mov; // set nmov to only those in mov int cmov = mov & mask; // write to static variables (shrinking the values, and memory usage)