///////////////////////////////////////////////////////
| 168 | { |
| 169 | //////////////////////////////////////////////////////////// |
| 170 | void JoystickImpl::initialize() |
| 171 | { |
| 172 | hid_init(nullptr); |
| 173 | |
| 174 | // Do an initial scan |
| 175 | updatePluggedList(); |
| 176 | |
| 177 | // Map of hat values |
| 178 | hatValueMap[0] = std::make_pair(0, 0); // center |
| 179 | |
| 180 | hatValueMap[1] = std::make_pair(0, -100); // top |
| 181 | hatValueMap[3] = std::make_pair(100, 0); // right |
| 182 | hatValueMap[5] = std::make_pair(0, 100); // bottom |
| 183 | hatValueMap[7] = std::make_pair(-100, 0); // left |
| 184 | |
| 185 | hatValueMap[2] = std::make_pair(100, -100); // top-right |
| 186 | hatValueMap[4] = std::make_pair(100, 100); // bottom-right |
| 187 | hatValueMap[6] = std::make_pair(-100, 100); // bottom-left |
| 188 | hatValueMap[8] = std::make_pair(-100, -100); // top-left |
| 189 | } |
| 190 | |
| 191 | |
| 192 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected