From ed784833dd3539ec30479e62537e482c9670181a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 May 2020 23:09:23 +0200 Subject: [PATCH] Buildfix --- src/input/zapper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input/zapper.c b/src/input/zapper.c index 7729e5b..a0a7dd2 100644 --- a/src/input/zapper.c +++ b/src/input/zapper.c @@ -163,10 +163,12 @@ static uint32 InefficientSqrt(uint32 z) { } #endif -void FCEU_ZapperSetTolerance(int t) { +void FCEU_ZapperSetTolerance(int t) +{ #ifdef ROUNDED_TARGET + uint32_t y; tolerance = t <= MAX_TOLERANCE ? t : MAX_TOLERANCE; - for (uint32 y = 0 ; y <= tolerance ; y++) + for (y = 0; y <= tolerance; y++) targetExpansion[y] = InefficientSqrt(tolerance*tolerance-y*y); #else tolerance = t;