SDL: Check to see if joysticks are actually initialized in SDL_UpdateJoysticks() (70b12)

From 70b12c1b1bf6364553b8f64d074e06bb3f813500 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 30 Oct 2025 08:53:57 -0700
Subject: [PATCH] Check to see if joysticks are actually initialized in
 SDL_UpdateJoysticks()

Fixes https://github.com/libsdl-org/SDL/issues/14362

(cherry picked from commit c21b7f8cb84c43955c83cbd25528861a29f112be)
---
 src/joystick/SDL_joystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 2f60e20eb2d59..5ce36de867e19 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -2502,7 +2502,7 @@ void SDL_UpdateJoysticks(void)
     Uint64 now;
     SDL_Joystick *joystick;
 
-    if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
+    if (!SDL_joysticks_initialized) {
         return;
     }