diff --git a/input/input_mapper.c b/input/input_mapper.c index e0b20bdcc0..01b50fbdf7 100644 --- a/input/input_mapper.c +++ b/input/input_mapper.c @@ -48,12 +48,12 @@ struct input_mapper { /* The controller port that will be polled*/ uint8_t port; - /* This is a bitmask of (1 << key_bind_id). */ - uint64_t buttons; /* Left X, Left Y, Right X, Right Y */ int16_t analog[4]; /* the whole keyboard state */ uint32_t keys[RETROK_LAST / 32 + 1]; + /* This is a bitmask of (1 << key_bind_id). */ + uint64_t buttons; }; static input_mapper_t *mapper_ptr; @@ -63,11 +63,11 @@ input_mapper_t *input_mapper_new(uint16_t port) settings_t *settings = config_get_ptr(); input_mapper_t* handle = (input_mapper_t*) calloc(1, sizeof(*handle)); - if (!handle) return NULL; + handle->port = port; - mapper_ptr = handle; + mapper_ptr = handle; return handle; } diff --git a/input/input_overlay.c b/input/input_overlay.c index 507b1c4309..01bea5f40c 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -39,31 +39,32 @@ typedef struct input_overlay_state { - /* This is a bitmask of (1 << key_bind_id). */ - uint64_t buttons; /* Left X, Left Y, Right X, Right Y */ int16_t analog[4]; - uint32_t keys[RETROK_LAST / 32 + 1]; + /* This is a bitmask of (1 << key_bind_id). */ + uint64_t buttons; } input_overlay_state_t; struct input_overlay { - void *iface_data; - const video_overlay_interface_t *iface; - input_overlay_state_t overlay_state; - bool enable; + enum overlay_status state; + bool enable; bool blocked; bool alive; - struct overlay *overlays; - const struct overlay *active; + unsigned next_index; + size_t index; size_t size; - unsigned next_index; - enum overlay_status state; + struct overlay *overlays; + const struct overlay *active; + void *iface_data; + const video_overlay_interface_t *iface; + + input_overlay_state_t overlay_state; }; input_overlay_t *overlay_ptr = NULL;