[PATCH] only run EV_FLIP when actually trying to flip a piece
Export this patch
---
main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 8d93aa9..fab8fea 100644
--- a/main.c
+++ b/main.c
@@ -8322,7 +8322,8 @@ gameinput(const uint8_t inputs[static 4][2], uint8_t i)
} else if (pressed & INPUT_MASK_FLIP_CCW) {
g->flip = -1;
}
- run_mods(EV_FLIP, i, 0);
+ if (g->flip != 0)
+ run_mods(EV_FLIP, i, 0);
/* mod may have done rotation itself (or cancelled it),
* and set g->flip to 0 */
if (g->flip != 0) {
--
2.41.0
Thanks!
To gitsrht:~sebsite/generic-tetromino-game
c65a632..b570149 main -> main