mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Fix imput in RetroArch menu
This commit is contained in:
parent
e93f362427
commit
fffe1d099c
@ -67,20 +67,19 @@ error:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rwebinput_key_pressed(void *data, int key)
|
static bool rwebinput_key_pressed__(void *data, int key)
|
||||||
{
|
{
|
||||||
unsigned sym;
|
unsigned sym;
|
||||||
|
bool ret;
|
||||||
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
|
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
|
||||||
|
|
||||||
if (key >= RETROK_LAST)
|
if (key >= RETROK_LAST)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
sym = input_keymaps_translate_rk_to_keysym((enum retro_key)key);
|
sym = input_keymaps_translate_rk_to_keysym((enum retro_key)key);
|
||||||
|
ret = rwebinput->state.keys[sym >> 3] & (1 << (sym & 7));
|
||||||
|
|
||||||
if (rwebinput->state.keys[sym >> 3] & (1 << (sym & 7)))
|
return ret;
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rwebinput_meta_key_pressed(void *data, int key)
|
static bool rwebinput_meta_key_pressed(void *data, int key)
|
||||||
@ -96,12 +95,18 @@ static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput,
|
|||||||
if (id < RARCH_BIND_LIST_END)
|
if (id < RARCH_BIND_LIST_END)
|
||||||
{
|
{
|
||||||
const struct retro_keybind *bind = &binds[id];
|
const struct retro_keybind *bind = &binds[id];
|
||||||
return bind->valid && rwebinput_key_pressed(rwebinput, binds[id].key);
|
return bind->valid && rwebinput_key_pressed__(rwebinput, binds[id].key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool rwebinput_key_pressed(void *data, int key)
|
||||||
|
{
|
||||||
|
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
return rwebinput_is_pressed(rwebinput, settings->input.binds[0], key);
|
||||||
|
}
|
||||||
static int16_t rwebinput_mouse_state(rwebinput_input_t *rwebinput, unsigned id)
|
static int16_t rwebinput_mouse_state(rwebinput_input_t *rwebinput, unsigned id)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user