Browse Source

Fixed uninitialized variable

Sam Lantinga 1 year ago
parent
commit
b7d7e54895
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/joystick/apple/SDL_mfijoystick.m

+ 1 - 1
src/joystick/apple/SDL_mfijoystick.m

@@ -554,7 +554,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
     if (controller.extendedGamepad) {
         GCExtendedGamepad *gamepad = controller.extendedGamepad;
         int nbuttons = 0;
-        BOOL has_direct_menu;
+        BOOL has_direct_menu = FALSE;
 
         /* These buttons are part of the original MFi spec */
         device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_SOUTH);