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

main
Sam Lantinga 2024-04-01 14:27:19 -07:00
parent c10a3df552
commit 85b7f131b0
1 changed files with 1 additions and 1 deletions

View File

@ -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