Minor cleanup

This commit is contained in:
Sam Lantinga 2021-01-23 11:21:01 -08:00
parent 1981d23f4b
commit c857b5e0c9
5 changed files with 18 additions and 56 deletions

View file

@ -413,6 +413,12 @@ HIDAPI_DumpPacket(const char *prefix, Uint8 *data, int size)
SDL_free(buffer);
}
float
HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float output_max)
{
return output_min + (output_max - output_min) * (val - val_min) / (val_max - val_min);
}
static void HIDAPI_JoystickDetect(void);
static void HIDAPI_JoystickClose(SDL_Joystick * joystick);