diff --git a/input/input_overlay.c b/input/input_overlay.c index 6bd32274fb..bd701f4476 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -810,6 +810,9 @@ void input_overlay_post_poll(input_overlay_t *ol, float opacity) { size_t i; + if (!ol) + return; + input_overlay_set_alpha_mod(ol, opacity); for (i = 0; i < ol->active->size; i++) diff --git a/input/keyboard_line.c b/input/keyboard_line.c index 3e7d3a0e06..0ae6f7a5d3 100644 --- a/input/keyboard_line.c +++ b/input/keyboard_line.c @@ -259,13 +259,17 @@ void input_keyboard_event(bool down, unsigned code, if (!down) return; - if (device == RETRO_DEVICE_POINTER && code != 0x12d) + switch (device) { - if (!input_keyboard_line_event(g_keyboard_line, (char)code)) - return; + case RETRO_DEVICE_POINTER: + if (!input_keyboard_line_event(g_keyboard_line, (code != 0x12d) ? (char)code : character)) + return; + break; + default: + if (!input_keyboard_line_event(g_keyboard_line, character)) + return; + break; } - else if (!input_keyboard_line_event(g_keyboard_line, character)) - return; /* Line is complete, can free it now. */ input_keyboard_line_free(g_keyboard_line);