MCPcopy Create free account
hub / github.com/AntiMicroX/antimicrox / updateSetSensorButtonNames

Method updateSetSensorButtonNames

src/inputdevice.cpp:1057–1068  ·  view source on GitHub ↗

* @brief Rename mapped sensor button in all sets to the name in the active set * @param type The sensor type which has the to be renamed button * @param direction The direction of the to be renamed button */

Source from the content-addressed store, hash-verified

1055 * @param direction The direction of the to be renamed button
1056 */
1057void InputDevice::updateSetSensorButtonNames(JoySensorType type, JoySensorDirection direction)
1058{
1059 JoySensor *sensor = getActiveSetJoystick()->getSensor(type);
1060
1061 if (sensor != nullptr)
1062 {
1063 JoySensorButton *button = sensor->getDirectionButton(direction);
1064
1065 if (button != nullptr)
1066 setSensorButtonName(type, direction, button->getButtonName());
1067 }
1068}
1069
1070void InputDevice::updateSetDPadButtonNames(int dpadIndex, int buttonIndex)
1071{

Callers

nothing calls this directly

Calls 3

getButtonNameMethod · 0.80
getSensorMethod · 0.45
getDirectionButtonMethod · 0.45

Tested by

no test coverage detected