| 86 | } |
| 87 | |
| 88 | static void onButtonEvent(std::string_view deviceName, |
| 89 | int deviceId, |
| 90 | int keyCode, |
| 91 | bool isPressed, |
| 92 | float value, |
| 93 | bool isAnalog) |
| 94 | { |
| 95 | auto iter = findController(deviceName, deviceId); |
| 96 | if (iter == Controller::s_allController.end()) |
| 97 | { |
| 98 | AXLOGD("onButtonEvent:connect new controller."); |
| 99 | onConnected(deviceName, deviceId); |
| 100 | iter = findController(deviceName, deviceId); |
| 101 | } |
| 102 | |
| 103 | (*iter)->onButtonEvent(keyCode, isPressed, value, isAnalog); |
| 104 | } |
| 105 | |
| 106 | static void onAxisEvent(std::string_view deviceName, int deviceId, int axisCode, float value, bool isAnalog) |
| 107 | { |
nothing calls this directly
no test coverage detected