Skip to content

Commit

Permalink
(iOS/Cocoa) Try this - prefer MFi analog value over BTStack one
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Nov 18, 2015
1 parent d399bc1 commit e27d533
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions input/drivers/cocoa_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static int16_t cocoa_input_state(void *data,
const struct retro_keybind **binds, unsigned port,
unsigned device, unsigned idx, unsigned id)
{
int16_t ret;
cocoa_input_data_t *apple = (cocoa_input_data_t*)data;

if (!apple || !apple->joypad)
Expand All @@ -276,13 +277,14 @@ static int16_t cocoa_input_state(void *data,
#endif
;
case RETRO_DEVICE_ANALOG:
return input_joypad_analog(apple->joypad, port,
idx, id, binds[port])
#ifdef HAVE_MFI
|| input_joypad_analog(apple->sec_joypad, port,
ret = input_joypad_analog(apple->sec_joypad, port,
idx, id, binds[port]);
if (!ret)
#endif
;
ret = input_joypad_analog(apple->joypad, port,
idx, id, binds[port]);
return ret;
case RETRO_DEVICE_KEYBOARD:
return cocoa_keyboard_state(apple, id);
case RETRO_DEVICE_MOUSE:
Expand Down

0 comments on commit e27d533

Please sign in to comment.