How to map joystick trigger button using SIMCONNECT ? I'm receiving input from HAT button whenever it is operated, same way I'm trying to do with trigger button, but I'm not receiving any response.
Code: Select all
// Reading input from HAT button
hr = SimConnect_MapClientEventToSimEvent(g_hSimConnect, EVENT_HAT);
hr = SimConnect_AddClientEventToNotificationGroup(g_hSimConnect, GROUP_ID_COCKPIT, EVENT_HAT);
hr = SimConnect_MapInputEventToClientEvent(g_hSimConnect, INPUT_HAT, "joystick:0:POV", EVENT_HAT);
hr = SimConnect_SetInputGroupState(g_hSimConnect, INPUT_HAT, SIMCONNECT_STATE_ON);
// Reading input from Trigger button
hr = SimConnect_MapClientEventToSimEvent(g_hSimConnect, EVENT_FIRE);
hr = SimConnect_AddClientEventToNotificationGroup(g_hSimConnect, GROUP_ID_COCKPIT, EVENT_FIRE);
hr = SimConnect_MapInputEventToClientEvent(g_hSimConnect, INPUT_FIRE, "joystick:0:button:1", EVENT_FIRE);
hr = SimConnect_SetInputGroupState(g_hSimConnect, INPUT_FIRE, SIMCONNECT_STATE_ON);
Manoj S