britzl
May 29, 2021, 9:42am
21
Thanks. BUTTON_MODE (key code 110) is currently not mapped to anything. The translations can be seen here:
What we need to do for buttons is to provide a mapping from BUTTON_MODE to the next free button index.
And AXIS mappings:
static void glfwAndroidUpdateAxis(const AInputEvent* event)
{
const int32_t joystickIndex = glfwAndroidFindJoystick(AInputEvent_getDeviceId(event));
if (joystickIndex >= 0)
{
glfwAndroidUpdateAxisValue(joystickIndex, event, AMOTION_EVENT_AXIS_X);
glfwAndroidUpdateAxisValue(joystickIndex, event, AMOTION_EVENT_AXIS_Y);
glfwAndroidUpdateAxisValue(joystickIndex, event, AMOTION_EVENT_AXIS_Z);
glfwAndroidUpdateAxisValue(joystickIndex, event, AMOTION_EVENT_AXIS_RZ);
}
}
What we need here is to add two new mappings from AXIS_GAS and AXIS_BREAK to the next two free axis indices.
1 Like
AGulev
May 29, 2021, 10:01am
22
I think it would be better to use AMOTION_EVENT_AXIS_LTRIGGER
and AMOTION_EVENT_AXIS_RTRIGGER
. It has the same values but feels a bit more suitable than BREAK and GAS (which are for a steering wheel with pedals, I think)
1 Like
britzl
May 29, 2021, 1:56pm
23
Ah yes indeed. I thought we already had axis bindings for those!
1 Like