mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
More iOS ifdefs
This commit is contained in:
parent
9e0a86e446
commit
08a343fbd0
@ -125,6 +125,7 @@ const struct apple_key_name_map_entry apple_key_name_map[] =
|
||||
{ "nul", 0x00},
|
||||
};
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
void cocoa_input_enable_small_keyboard(bool on)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
@ -153,6 +154,7 @@ void cocoa_input_reset_icade_buttons(void)
|
||||
if (apple)
|
||||
apple->icade_buttons = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t cocoa_input_find_any_key(void)
|
||||
{
|
||||
@ -177,8 +179,10 @@ static int cocoa_input_find_any_button_ret(cocoa_input_data_t *apple,
|
||||
unsigned buttons, unsigned port)
|
||||
{
|
||||
unsigned i;
|
||||
#if TARGET_OS_IPHONE
|
||||
if (port == 0 && apple->icade_enabled)
|
||||
BIT32_SET(buttons, apple->icade_buttons);
|
||||
#endif
|
||||
|
||||
if (buttons)
|
||||
for (i = 0; i < 32; i++)
|
||||
@ -277,8 +281,10 @@ static void cocoa_input_poll(void *data)
|
||||
if (apple->joypad)
|
||||
apple->joypad->poll();
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
if (apple->icade_enabled)
|
||||
BIT32_SET(apple->buttons[0], apple->icade_buttons);
|
||||
#endif
|
||||
|
||||
apple->mouse_x_last = apple->mouse_rel_x;
|
||||
apple->mouse_y_last = apple->mouse_rel_y;
|
||||
|
@ -55,23 +55,28 @@ typedef struct
|
||||
uint32_t key_state[MAX_KEYS];
|
||||
|
||||
uint32_t buttons[MAX_USERS];
|
||||
uint32_t mfi_buttons[MAX_USERS];
|
||||
int16_t axes[MAX_USERS][4];
|
||||
int8_t hats[NUM_HATS][2];
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
uint32_t mfi_buttons[MAX_USERS];
|
||||
|
||||
bool icade_enabled;
|
||||
bool small_keyboard_enabled;
|
||||
bool small_keyboard_active;
|
||||
uint32_t icade_buttons;
|
||||
#endif
|
||||
|
||||
const input_device_driver_t *joypad;
|
||||
} cocoa_input_data_t;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
void cocoa_input_enable_icade(bool on);
|
||||
|
||||
void cocoa_input_enable_small_keyboard(bool on);
|
||||
|
||||
void cocoa_input_reset_icade_buttons(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user