mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(Emscripten) Simplify input driver's init function
This commit is contained in:
parent
1f7482d833
commit
6630884254
@ -50,18 +50,20 @@ static void *rwebinput_input_init(void)
|
||||
{
|
||||
rwebinput_input_t *rwebinput = (rwebinput_input_t*)calloc(1, sizeof(*rwebinput));
|
||||
if (!rwebinput)
|
||||
return NULL;
|
||||
goto error;
|
||||
|
||||
rwebinput->context = RWebInputInit();
|
||||
if (!rwebinput->context)
|
||||
{
|
||||
free(rwebinput);
|
||||
return NULL;
|
||||
}
|
||||
goto error;
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_rwebinput);
|
||||
|
||||
return rwebinput;
|
||||
|
||||
error:
|
||||
if (rwebinput)
|
||||
free(rwebinput);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool rwebinput_key_pressed(rwebinput_input_t *rwebinput, int key)
|
||||
|
Loading…
x
Reference in New Issue
Block a user