mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
(MFi) Build fixes
This commit is contained in:
parent
346f44a7da
commit
6c6a293388
@ -173,7 +173,8 @@ int32_t cocoa_input_find_any_key(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cocoa_input_find_any_button_ret(unsigned buttons)
|
static int cocoa_input_find_any_button_ret(cocoa_input_data_t *apple,
|
||||||
|
unsigned buttons, unsigned port)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
if (port == 0 && apple->icade_enabled)
|
if (port == 0 && apple->icade_enabled)
|
||||||
@ -198,13 +199,13 @@ int32_t cocoa_input_find_any_button(uint32_t port)
|
|||||||
if (apple->joypad)
|
if (apple->joypad)
|
||||||
apple->joypad->poll();
|
apple->joypad->poll();
|
||||||
|
|
||||||
ret = cocoa_input_find_any_button_ret(apple->buttons[port]);
|
ret = cocoa_input_find_any_button_ret(apple, apple->buttons[port], port);
|
||||||
|
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
#ifdef HAVE_MFI
|
#ifdef HAVE_MFI
|
||||||
ret = cocoa_input_find_any_button_ret(apple->mfi_buttons[port]);
|
ret = cocoa_input_find_any_button_ret(apple, apple->mfi_buttons[port], port);
|
||||||
|
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -764,7 +764,11 @@ static uint64_t btstack_hid_joypad_get_buttons(void *data, unsigned port)
|
|||||||
|
|
||||||
static bool btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
static bool btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
uint64_t buttons = btstack_hid_joypad_get_buttons(data, port);
|
uint64_t buttons = btstack_hid_joypad_get_buttons(data, port);
|
||||||
|
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
||||||
|
cocoa_input_data_t *apple = (cocoa_input_data_t*)driver->input_data;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (joykey == NO_BTN)
|
if (joykey == NO_BTN)
|
||||||
return false;
|
return false;
|
||||||
|
@ -39,7 +39,7 @@ static bool apple_gamecontroller_available(void)
|
|||||||
|
|
||||||
static void apple_gamecontroller_poll(GCController *controller)
|
static void apple_gamecontroller_poll(GCController *controller)
|
||||||
{
|
{
|
||||||
uint32_t i, slot, pause;
|
uint32_t slot, pause;
|
||||||
uint32_t *buttons;
|
uint32_t *buttons;
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
cocoa_input_data_t *apple = (cocoa_input_data_t*)driver->input_data;
|
cocoa_input_data_t *apple = (cocoa_input_data_t*)driver->input_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user