mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Add exception for RETRO_DEVICE_KEYBOARD in input_state callback.
This commit is contained in:
parent
1b6b313787
commit
45579376f0
@ -119,6 +119,9 @@ static void update_input(void)
|
|||||||
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN))
|
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN))
|
||||||
fprintf(stderr, "Return key is pressed!\n");
|
fprintf(stderr, "Return key is pressed!\n");
|
||||||
|
|
||||||
|
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_x))
|
||||||
|
fprintf(stderr, "x key is pressed!\n");
|
||||||
|
|
||||||
dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 2000;
|
dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 2000;
|
||||||
dir_y += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 2000;
|
dir_y += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 2000;
|
||||||
//dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 2000;
|
//dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 2000;
|
||||||
|
@ -459,7 +459,7 @@ static int16_t input_state(unsigned port, unsigned device, unsigned index, unsig
|
|||||||
};
|
};
|
||||||
|
|
||||||
int16_t res = 0;
|
int16_t res = 0;
|
||||||
if (id < RARCH_FIRST_META_KEY)
|
if (id < RARCH_FIRST_META_KEY || device == RETRO_DEVICE_KEYBOARD)
|
||||||
res = input_input_state_func(binds, port, device, index, id);
|
res = input_input_state_func(binds, port, device, index, id);
|
||||||
|
|
||||||
#ifdef HAVE_BSV_MOVIE
|
#ifdef HAVE_BSV_MOVIE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user