(Apple) Use BIT32_ * macros throughout apple_input.c to prevent typos

This commit is contained in:
Twinaphex 2014-10-06 01:57:59 +02:00
parent 0789b05d0b
commit 7f0700bc5b
2 changed files with 6 additions and 6 deletions

View File

@ -232,9 +232,9 @@ static void handle_icade_event(unsigned keycode)
const int button = icade_map[keycode].button;
if (icade_map[keycode].up)
icade_buttons &= ~(1 << button);
BIT32_CLEAR(icade_buttons, button);
else
icade_buttons |= (1 << button);
BIT32_SET(icade_buttons, button);
}
}
@ -334,7 +334,7 @@ int32_t apple_input_find_any_button(uint32_t port)
buttons = apple->buttons[port];
if (port == 0)
buttons |= apple_input_get_icade_buttons();
BIT32_SET(buttons, apple_input_get_icade_buttons());
if (buttons)
for (i = 0; i != 32; i ++)
@ -416,7 +416,7 @@ static void apple_input_poll(void *data)
if (apple->joypad)
apple->joypad->poll();
apple->buttons[0] |= apple_input_get_icade_buttons();
BIT32_SET(apple->buttons[0], apple_input_get_icade_buttons());
apple->mouse_delta[0] = 0;
apple->mouse_delta[1] = 0;

View File

@ -106,9 +106,9 @@ static void hid_device_input_callback(void* context, IOReturn result,
unsigned id = use - 1;
if (state)
apple->buttons[connection->slot] |= (1 << id);
BIT32_SET(apple->buttons[connection->slot], id);
else
apple->buttons[connection->slot] &= ~(1 << id);
BIT32_CLEAR(apple->buttons[connection->slot], id);
}
break;
}