From 19ecb64e0dfea5616798f77d8262715f0d722038 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 2 Oct 2022 10:18:57 -0700
Subject: [PATCH] Fixed build
---
test/testjoystick.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/testjoystick.c b/test/testjoystick.c
index 3fb004ff03e..96f4be1809a 100644
--- a/test/testjoystick.c
+++ b/test/testjoystick.c
@@ -245,9 +245,9 @@ loop(void *arg)
SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0xFF, SDL_ALPHA_OPAQUE);
for (i = 0; i < SDL_JoystickNumHats(joystick); ++i) {
/* Derive the new position */
+ const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i);
x = SCREEN_WIDTH/2;
y = SCREEN_HEIGHT/2;
- const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i);
if (hat_pos & SDL_HAT_UP) {
y = 0;