mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-06 18:37:11 +00:00
Get rid of meta_key_pressed
This commit is contained in:
parent
7b210ccf37
commit
69f85556a3
@ -1582,7 +1582,6 @@ input_driver_t input_android = {
|
||||
android_input_init,
|
||||
android_input_poll,
|
||||
android_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
android_input_free_input,
|
||||
android_input_set_sensor_state,
|
||||
android_input_get_sensor_input,
|
||||
|
@ -421,7 +421,6 @@ input_driver_t input_cocoa = {
|
||||
cocoa_input_init,
|
||||
cocoa_input_poll,
|
||||
cocoa_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
cocoa_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -35,8 +35,6 @@ typedef struct ctr_input
|
||||
const input_device_driver_t *joypad;
|
||||
} ctr_input_t;
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
|
||||
static void ctr_input_poll(void *data)
|
||||
{
|
||||
ctr_input_t *ctr = (ctr_input_t*)data;
|
||||
@ -92,14 +90,6 @@ static void* ctr_input_init(const char *joypad_driver)
|
||||
return ctr;
|
||||
}
|
||||
|
||||
static bool ctr_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
if (BIT64_GET(lifecycle_state, key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint64_t ctr_input_get_capabilities(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -152,7 +142,6 @@ input_driver_t input_ctr = {
|
||||
ctr_input_init,
|
||||
ctr_input_poll,
|
||||
ctr_input_state,
|
||||
ctr_input_meta_key_pressed,
|
||||
ctr_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -920,7 +920,6 @@ input_driver_t input_dinput = {
|
||||
dinput_init,
|
||||
dinput_poll,
|
||||
dinput_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
dinput_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -124,7 +124,6 @@ input_driver_t input_dos = {
|
||||
dos_input_init,
|
||||
dos_input_poll,
|
||||
dos_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
dos_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -31,8 +31,6 @@
|
||||
#define MAX_PADS 4
|
||||
#endif
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
|
||||
typedef struct gx_input
|
||||
{
|
||||
bool blocked;
|
||||
@ -97,14 +95,6 @@ static void gx_input_poll(void *data)
|
||||
gx->joypad->poll();
|
||||
}
|
||||
|
||||
static bool gx_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
if (BIT64_GET(lifecycle_state, key))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint64_t gx_input_get_capabilities(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -157,7 +147,6 @@ input_driver_t input_gx = {
|
||||
gx_input_init,
|
||||
gx_input_poll,
|
||||
gx_input_state,
|
||||
gx_input_meta_key_pressed,
|
||||
gx_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -218,7 +218,6 @@ input_driver_t input_linuxraw = {
|
||||
linuxraw_input_init,
|
||||
linuxraw_input_poll,
|
||||
linuxraw_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
linuxraw_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -43,14 +43,6 @@ static int16_t nullinput_input_state(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool nullinput_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
(void)data;
|
||||
(void)key;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void nullinput_input_free_input(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -100,7 +92,6 @@ input_driver_t input_null = {
|
||||
nullinput_input_init,
|
||||
nullinput_input_poll,
|
||||
nullinput_input_state,
|
||||
nullinput_input_meta_key_pressed,
|
||||
nullinput_input_free_input,
|
||||
nullinput_set_sensor_state,
|
||||
NULL,
|
||||
|
@ -261,7 +261,6 @@ input_driver_t input_ps3 = {
|
||||
ps3_input_init,
|
||||
ps3_input_poll,
|
||||
ps3_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
ps3_input_free_input,
|
||||
ps3_input_set_sensor_state,
|
||||
NULL,
|
||||
|
@ -49,8 +49,6 @@ typedef struct psp_input
|
||||
const input_device_driver_t *joypad;
|
||||
} psp_input_t;
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
|
||||
static void psp_input_poll(void *data)
|
||||
{
|
||||
psp_input_t *psp = (psp_input_t*)data;
|
||||
@ -106,11 +104,6 @@ static void* psp_input_initialize(const char *joypad_driver)
|
||||
return psp;
|
||||
}
|
||||
|
||||
static bool psp_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return (BIT64_GET(lifecycle_state, key));
|
||||
}
|
||||
|
||||
static uint64_t psp_input_get_capabilities(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -163,7 +156,6 @@ input_driver_t input_psp = {
|
||||
psp_input_initialize,
|
||||
psp_input_poll,
|
||||
psp_input_state,
|
||||
psp_input_meta_key_pressed,
|
||||
psp_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -848,7 +848,6 @@ input_driver_t input_qnx = {
|
||||
qnx_input_init,
|
||||
qnx_input_poll,
|
||||
qnx_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
qnx_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -247,7 +247,6 @@ input_driver_t input_rwebinput = {
|
||||
rwebinput_input_init,
|
||||
rwebinput_input_poll,
|
||||
rwebinput_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
rwebinput_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -404,7 +404,6 @@ input_driver_t input_sdl = {
|
||||
sdl_input_init,
|
||||
sdl_input_poll,
|
||||
sdl_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
sdl_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -1155,7 +1155,6 @@ input_driver_t input_udev = {
|
||||
udev_input_init,
|
||||
udev_input_poll,
|
||||
udev_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
udev_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -324,7 +324,6 @@ input_driver_t input_wayland = {
|
||||
NULL,
|
||||
input_wl_poll,
|
||||
input_wl_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
input_wl_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -46,9 +46,6 @@ typedef struct wiiu_input
|
||||
const input_device_driver_t *joypad;
|
||||
} wiiu_input_t;
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
|
||||
|
||||
void kb_connection_callback(KBDKeyEvent *key)
|
||||
{
|
||||
keyboardChannel = keyboardChannel + (key->channel + 0x01);
|
||||
@ -200,11 +197,6 @@ static void* wiiu_input_init(const char *joypad_driver)
|
||||
return wiiu;
|
||||
}
|
||||
|
||||
static bool wiiu_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return BIT64_GET(lifecycle_state, key);
|
||||
}
|
||||
|
||||
static uint64_t wiiu_input_get_capabilities(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -260,7 +252,6 @@ input_driver_t input_wiiu = {
|
||||
wiiu_input_init,
|
||||
wiiu_input_poll,
|
||||
wiiu_input_state,
|
||||
wiiu_input_meta_key_pressed,
|
||||
wiiu_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -836,7 +836,6 @@ input_driver_t input_winraw = {
|
||||
winraw_init,
|
||||
winraw_poll,
|
||||
winraw_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
winraw_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -526,7 +526,6 @@ input_driver_t input_x = {
|
||||
x_input_init,
|
||||
x_input_poll,
|
||||
x_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
x_input_free,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -173,7 +173,6 @@ input_driver_t input_xinput = {
|
||||
xdk_input_init,
|
||||
xdk_input_poll,
|
||||
xdk_input_state,
|
||||
NULL, /* meta_key_pressed */
|
||||
xdk_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -90,11 +90,6 @@ static void* xenon360_input_init(const char *joypad_driver)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static bool xenon360_input_meta_key_pressed(void *data, int key)
|
||||
{
|
||||
return (state & (UINT64_C(1) << key));
|
||||
}
|
||||
|
||||
static uint64_t xenon360_input_get_capabilities(void *data)
|
||||
{
|
||||
uint64_t caps = 0;
|
||||
@ -125,7 +120,6 @@ input_driver_t input_xenon360 = {
|
||||
xenon360_input_init,
|
||||
xenon360_input_poll,
|
||||
xenon360_input_state,
|
||||
xenon360_input_meta_key_pressed,
|
||||
xenon360_input_free_input,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -233,6 +233,7 @@ static const uint8_t buttons[] = {
|
||||
static uint16_t input_config_vid[MAX_USERS];
|
||||
static uint16_t input_config_pid[MAX_USERS];
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
char input_device_names[MAX_INPUT_DEVICES][64];
|
||||
struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind input_autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
@ -787,13 +788,10 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2)
|
||||
static INLINE bool input_keys_pressed_iterate(unsigned i,
|
||||
retro_bits_t* p_new_state)
|
||||
{
|
||||
if (current_input->meta_key_pressed)
|
||||
{
|
||||
if ((i >= RARCH_FIRST_META_KEY) &&
|
||||
current_input->meta_key_pressed(current_input_data, i)
|
||||
)
|
||||
return true;
|
||||
}
|
||||
if ((i >= RARCH_FIRST_META_KEY) &&
|
||||
BIT64_GET(lifecycle_state, i)
|
||||
)
|
||||
return true;
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (overlay_ptr &&
|
||||
|
@ -147,8 +147,6 @@ typedef struct input_driver
|
||||
const struct retro_keybind **retro_keybinds,
|
||||
unsigned port, unsigned device, unsigned index, unsigned id);
|
||||
|
||||
bool (*meta_key_pressed)(void *data, int key);
|
||||
|
||||
/* Frees the input struct. */
|
||||
void (*free)(void *data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user