Revert "(Cocoa) Optimize button bitmask code - do a bitwise OR on"

This reverts commit 00bea7f3b2f3038ea01317743fd782431fd8a1ef.
This commit is contained in:
twinaphex 2020-08-28 17:33:15 +02:00
parent 97ebed7c0e
commit e725b7c013

View File

@ -209,22 +209,22 @@ static int16_t cocoa_input_state(void *data,
{
unsigned i;
int16_t ret = 0;
int16_t ret =
apple->joypad->state(
joypad_info, binds[port], port)
#ifdef HAVE_MFI
| apple->sec_joypad->state(
joypad_info, binds[port], port)
#endif
;
if (!input_dinput.keyboard_mapping_blocked)
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
{
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
if (binds[port][i].valid)
{
if ((binds[port][i].key < RETROK_LAST) &&
apple_key_state[rarch_keysym_lut[binds[port][i].key]] & 0x80)
ret |= (1 << i);
if (button_is_pressed(
apple->joypad,
joypad_info, binds[port], port, i))
ret |= (1 << i);
#ifdef HAVE_MFI
else if (button_is_pressed(
apple->sec_joypad,
joypad_info, binds[port], port, i))
ret |= (1 << i);
#endif
else if (apple_key_state[rarch_keysym_lut[binds[port][i].key]])
ret |= (1 << i);
}
}
return ret;