SDL: Fixed warning C4701: potentially uninitialized local variable 'percent' used

From 85b7f131b0e36aa74c54b0dba7a942d3a0683699 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 1 Apr 2024 14:27:19 -0700
Subject: [PATCH] Fixed warning C4701: potentially uninitialized local variable
 'percent' used

---
 src/joystick/hidapi/SDL_hidapi_xboxone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c
index 77779b46cde7a..314d2ec5a6ba6 100644
--- a/src/joystick/hidapi/SDL_hidapi_xboxone.c
+++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c
@@ -1065,7 +1065,7 @@ static void HIDAPI_DriverXboxOneBluetooth_HandleBatteryPacket(SDL_Joystick *joys
     Uint8 flags = data[1];
     SDL_bool on_usb = (((flags & 0x0C) >> 2) == 0);
     SDL_PowerState state;
-    int percent;
+    int percent = 0;
 
     // Mapped percentage value from:
     // https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getbatterystate