mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
Rename cocoa_input_keyboard_event
This commit is contained in:
parent
025d2c6328
commit
d018f65e95
@ -51,17 +51,6 @@ typedef struct
|
||||
const input_device_driver_t *joypad;
|
||||
} cocoa_input_data_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void cocoa_input_keyboard_event(bool down, unsigned code,
|
||||
uint32_t character, uint32_t mod, unsigned device);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int32_t cocoa_input_find_any_key(void);
|
||||
|
||||
extern int32_t cocoa_input_find_any_button(uint32_t port);
|
||||
|
@ -274,7 +274,7 @@ static bool handle_icade_event(unsigned *code, bool *keydown)
|
||||
}
|
||||
#endif
|
||||
|
||||
void cocoa_input_keyboard_event(bool down,
|
||||
void apple_input_keyboard_event(bool down,
|
||||
unsigned code, uint32_t character, uint32_t mod, unsigned device)
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
|
@ -164,6 +164,13 @@ enum
|
||||
|
||||
#include "../input_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void apple_input_keyboard_event(bool down,
|
||||
unsigned code, uint32_t character, uint32_t mod, unsigned device)
|
||||
|
||||
int16_t apple_input_is_pressed(unsigned port_num,
|
||||
const struct retro_keybind *binds, unsigned id);
|
||||
|
||||
@ -173,4 +180,9 @@ int32_t apple_keyboard_find_any_key(void);
|
||||
|
||||
void apple_keyboard_free(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -86,11 +86,11 @@ void apple_rarch_exited(void)
|
||||
mod |= RETROKMOD_NUMLOCK;
|
||||
|
||||
for (i = 1; i < ch.length; i++)
|
||||
cocoa_input_keyboard_event(event_type == NSKeyDown,
|
||||
apple_input_keyboard_event(event_type == NSKeyDown,
|
||||
0, [ch characterAtIndex:i], mod, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
|
||||
cocoa_input_keyboard_event(event_type == NSKeyDown,
|
||||
apple_input_keyboard_event(event_type == NSKeyDown,
|
||||
event.keyCode, character, mod, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
break;
|
||||
@ -101,7 +101,7 @@ void apple_rarch_exited(void)
|
||||
bool down = (new_flags & old_flags) == old_flags;
|
||||
old_flags = new_flags;
|
||||
|
||||
cocoa_input_keyboard_event(down, event.keyCode,
|
||||
apple_input_keyboard_event(down, event.keyCode,
|
||||
0, event.modifierFlags, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
break;
|
||||
|
@ -200,17 +200,17 @@ enum
|
||||
unsigned i;
|
||||
character = [ch characterAtIndex:0];
|
||||
|
||||
cocoa_input_keyboard_event(event._isKeyDown,
|
||||
apple_input_keyboard_event(event._isKeyDown,
|
||||
(uint32_t)event._keyCode, 0, mod,
|
||||
RETRO_DEVICE_KEYBOARD);
|
||||
|
||||
for (i = 1; i < ch.length; i++)
|
||||
cocoa_input_keyboard_event(event._isKeyDown,
|
||||
apple_input_keyboard_event(event._isKeyDown,
|
||||
0, [ch characterAtIndex:i], mod,
|
||||
RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
|
||||
cocoa_input_keyboard_event(event._isKeyDown,
|
||||
apple_input_keyboard_event(event._isKeyDown,
|
||||
(uint32_t)event._keyCode, character, mod,
|
||||
RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
@ -244,8 +244,8 @@ enum
|
||||
switch (eventType)
|
||||
{
|
||||
case GSEVENT_TYPE_KEYDOWN:
|
||||
case GSEVENT_TYPE_KEYUP:
|
||||
cocoa_input_keyboard_event(eventType == GSEVENT_TYPE_KEYDOWN,
|
||||
case GSEVENT_TYPE_KEYUP:
|
||||
apple_input_keyboard_event(eventType == GSEVENT_TYPE_KEYDOWN,
|
||||
*(uint16_t*)&eventMem[0x3C], 0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user