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

Method createUnplugEventBitArray

src/inputdaemon.cpp:1012–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1010}
1011
1012QBitArray InputDaemon::createUnplugEventBitArray(InputDevice *device)
1013{
1014 InputDeviceBitArrayStatus tempStatus(device, false, this);
1015
1016 for (int i = 0; i < device->getNumberRawAxes(); i++)
1017 {
1018 JoyAxis *axis = device->getActiveSetJoystick()->getJoyAxis(i);
1019
1020 if ((axis != nullptr) && (axis->getThrottle() != static_cast<int>(JoyAxis::NormalThrottle)))
1021 tempStatus.changeAxesStatus(i, true);
1022 }
1023
1024 QBitArray unplugBitArray = tempStatus.generateFinalBitArray();
1025 return unplugBitArray;
1026}
1027
1028/**
1029 * @brief Dispatches postprocessed SDL events to the input objects like

Callers

nothing calls this directly

Calls 6

getJoyAxisMethod · 0.80
getActiveSetJoystickMethod · 0.80
changeAxesStatusMethod · 0.80
generateFinalBitArrayMethod · 0.80
getNumberRawAxesMethod · 0.45
getThrottleMethod · 0.45

Tested by

no test coverage detected