mfi_buttons should be only used now from within input/drivers_joypad/mfi_joypad.m

This commit is contained in:
twinaphex 2015-11-16 04:32:04 +01:00
parent 8b9b4242f7
commit f906814abe
2 changed files with 8 additions and 4 deletions

View File

@ -190,10 +190,14 @@ int32_t cocoa_input_find_any_button(uint32_t port)
return ret;
#ifdef HAVE_MFI
ret = cocoa_input_find_any_button_ret(apple, apple->mfi_buttons[port], port);
if (apple && apple->sec_joypad && apple->sec_joypad->get_buttons)
{
apple->sec_joypad->poll();
ret = cocoa_input_find_any_button_ret(apple, apple->sec_joypad->get_buttons(port), port);
if (ret != -1)
return ret;
if (ret != -1)
return ret;
}
#endif
return -1;

View File

@ -228,7 +228,7 @@ static uint64_t apple_gamecontroller_joypad_get_buttons(unsigned port)
cocoa_input_data_t *apple = (cocoa_input_data_t*)driver->input_data;
if (!apple)
return 0;
return apple->mfi_buttons;
return apple->mfi_buttons[port];
}
static int16_t apple_gamecontroller_joypad_axis(unsigned port, uint32_t joyaxis)