mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Cleanups
This commit is contained in:
parent
c0c3bb3dbd
commit
f321763b1c
@ -58,19 +58,21 @@ void free_xkb(void)
|
|||||||
|
|
||||||
int init_xkb(int fd, size_t size)
|
int init_xkb(int fd, size_t size)
|
||||||
{
|
{
|
||||||
char *map_str;
|
char *map_str = NULL;
|
||||||
mod_map_idx = (xkb_mod_index_t *)calloc(
|
mod_map_idx = (xkb_mod_index_t *)calloc(
|
||||||
MOD_MAP_SIZE, sizeof(xkb_mod_index_t));
|
MOD_MAP_SIZE, sizeof(xkb_mod_index_t));
|
||||||
|
|
||||||
if (!mod_map_idx)
|
if (!mod_map_idx)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
mod_map_bit = (uint16_t*)calloc(MOD_MAP_SIZE, sizeof(uint16_t));
|
mod_map_bit = (uint16_t*)
|
||||||
|
calloc(MOD_MAP_SIZE, sizeof(uint16_t));
|
||||||
|
|
||||||
if (!mod_map_bit)
|
if (!mod_map_bit)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
xkb_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
xkb_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||||
|
|
||||||
if (xkb_ctx)
|
if (xkb_ctx)
|
||||||
{
|
{
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
@ -107,6 +109,7 @@ int init_xkb(int fd, size_t size)
|
|||||||
string_list_free(list);
|
string_list_free(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xkb_map)
|
if (xkb_map)
|
||||||
{
|
{
|
||||||
xkb_mod_index_t *map_idx = (xkb_mod_index_t*)&mod_map_idx[0];
|
xkb_mod_index_t *map_idx = (xkb_mod_index_t*)&mod_map_idx[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user