This commit is contained in:
twinaphex 2020-08-28 19:58:13 +02:00
parent cdf7516c0c
commit ace0e3eb90
3 changed files with 12 additions and 13 deletions

View File

@ -349,12 +349,10 @@ static void* psp_input_initialize(const char *joypad_driver)
input_keymaps_init_keyboard_lut(rarch_key_map_vita); input_keymaps_init_keyboard_lut(rarch_key_map_vita);
unsigned int i; unsigned int i;
for (i = 0; i <= VITA_MAX_SCANCODE; i++) { for (i = 0; i <= VITA_MAX_SCANCODE; i++)
psp->keyboard_state[i] = false; psp->keyboard_state[i] = false;
} for (i = 0; i < 6; i++)
for (i = 0; i < 6; i++) {
psp->prev_keys[i] = 0; psp->prev_keys[i] = 0;
}
psp->mouse_x = 0; psp->mouse_x = 0;
psp->mouse_y = 0; psp->mouse_y = 0;
#endif #endif

View File

@ -315,14 +315,16 @@ static int qnx_discover_controllers(qnx_input_t *qnx)
ret = screen_get_context_property_iv(screen_ctx, ret = screen_get_context_property_iv(screen_ctx,
SCREEN_PROPERTY_DEVICE_COUNT, &deviceCount); SCREEN_PROPERTY_DEVICE_COUNT, &deviceCount);
if (ret < 0) { if (ret < 0)
{
RARCH_ERR("Error querying SCREEN_PROPERTY_DEVICE_COUNT: [%d] %s\n", RARCH_ERR("Error querying SCREEN_PROPERTY_DEVICE_COUNT: [%d] %s\n",
errno, strerror(errno)); errno, strerror(errno));
return false; return false;
} }
screen_device_t* devices_found = (screen_device_t*) screen_device_t* devices_found = (screen_device_t*)
calloc(deviceCount, sizeof(screen_device_t)); calloc(deviceCount, sizeof(screen_device_t));
if (!devices_found) { if (!devices_found)
{
RARCH_ERR("Error allocating devices_found, deviceCount=%d\n", RARCH_ERR("Error allocating devices_found, deviceCount=%d\n",
deviceCount); deviceCount);
return false; return false;
@ -330,7 +332,8 @@ static int qnx_discover_controllers(qnx_input_t *qnx)
ret = screen_get_context_property_pv(screen_ctx, ret = screen_get_context_property_pv(screen_ctx,
SCREEN_PROPERTY_DEVICES, (void**)devices_found); SCREEN_PROPERTY_DEVICES, (void**)devices_found);
if (ret < 0) { if (ret < 0)
{
RARCH_ERR("Error querying SCREEN_PROPERTY_DEVICES: [%d] %s\n", RARCH_ERR("Error querying SCREEN_PROPERTY_DEVICES: [%d] %s\n",
errno, strerror(errno)); errno, strerror(errno));
return false; return false;

View File

@ -628,7 +628,7 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput,
strnlen(key_event->code, sizeof(key_event->code))); strnlen(key_event->code, sizeof(key_event->code)));
translated_keycode = input_keymaps_translate_keysym_to_rk(keycode); translated_keycode = input_keymaps_translate_keysym_to_rk(keycode);
if (translated_keycode == RETROK_BACKSPACE) if ( translated_keycode == RETROK_BACKSPACE)
character = '\b'; character = '\b';
else if (translated_keycode == RETROK_RETURN || else if (translated_keycode == RETROK_RETURN ||
translated_keycode == RETROK_KP_ENTER) translated_keycode == RETROK_KP_ENTER)
@ -636,15 +636,13 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput,
else if (translated_keycode == RETROK_TAB) else if (translated_keycode == RETROK_TAB)
character = '\t'; character = '\t';
if (translated_keycode != RETROK_UNKNOWN) { if (translated_keycode != RETROK_UNKNOWN)
input_keyboard_event(keydown, translated_keycode, character, mod, input_keyboard_event(keydown, translated_keycode, character, mod,
RETRO_DEVICE_KEYBOARD); RETRO_DEVICE_KEYBOARD);
}
if (translated_keycode < RETROK_LAST && translated_keycode != RETROK_UNKNOWN) if ( translated_keycode < RETROK_LAST
{ && translated_keycode != RETROK_UNKNOWN)
rwebinput->keys[translated_keycode] = keydown; rwebinput->keys[translated_keycode] = keydown;
}
} }
static void rwebinput_input_poll(void *data) static void rwebinput_input_poll(void *data)