aboutsummaryrefslogtreecommitdiffstats
path: root/libgamepad_get_absolute_axis_info.c
blob: ebd38fd152742a4f7eac2c1d7bf02b41458b354a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* See LICENSE file for copyright and license details. */
#include "common.h"


const struct input_absinfo *
libgamepad_get_absolute_axis_info(struct libgamepad_device *device, uint16_t code)
{
	if ((size_t)code >= ELEMSOF(device->absolute_axis_map) || device->absolute_axis_map[code] == -1)
		return NULL;
	return &device->internals->absinfo[device->absolute_axis_map[code]];
}