///////////////////////////////////////////////////////
| 274 | |
| 275 | //////////////////////////////////////////////////////////// |
| 276 | bool JoystickImpl::open(unsigned int index) |
| 277 | { |
| 278 | if (directInput) |
| 279 | return openDInput(index); |
| 280 | |
| 281 | // No explicit "open" action is required |
| 282 | m_index = JOYSTICKID1 + index; |
| 283 | |
| 284 | // Store the joystick capabilities |
| 285 | const bool success = joyGetDevCaps(m_index, &m_caps, sizeof(m_caps)) == JOYERR_NOERROR; |
| 286 | |
| 287 | if (success) |
| 288 | { |
| 289 | m_identification.name = getDeviceName(m_index, m_caps); |
| 290 | m_identification.productId = m_caps.wPid; |
| 291 | m_identification.vendorId = m_caps.wMid; |
| 292 | } |
| 293 | |
| 294 | return success; |
| 295 | } |
| 296 | |
| 297 | |
| 298 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected