mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
Prevent segfault in overlay function
This commit is contained in:
parent
20fbecebe7
commit
8ace562670
@ -810,6 +810,9 @@ void input_overlay_post_poll(input_overlay_t *ol, float opacity)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
if (!ol)
|
||||||
|
return;
|
||||||
|
|
||||||
input_overlay_set_alpha_mod(ol, opacity);
|
input_overlay_set_alpha_mod(ol, opacity);
|
||||||
|
|
||||||
for (i = 0; i < ol->active->size; i++)
|
for (i = 0; i < ol->active->size; i++)
|
||||||
|
@ -259,13 +259,17 @@ void input_keyboard_event(bool down, unsigned code,
|
|||||||
if (!down)
|
if (!down)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (device == RETRO_DEVICE_POINTER && code != 0x12d)
|
switch (device)
|
||||||
{
|
{
|
||||||
if (!input_keyboard_line_event(g_keyboard_line, (char)code))
|
case RETRO_DEVICE_POINTER:
|
||||||
|
if (!input_keyboard_line_event(g_keyboard_line, (code != 0x12d) ? (char)code : character))
|
||||||
return;
|
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. */
|
/* Line is complete, can free it now. */
|
||||||
input_keyboard_line_free(g_keyboard_line);
|
input_keyboard_line_free(g_keyboard_line);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user