| 142 | } |
| 143 | |
| 144 | HeadsetControlStatus initializeStatus(int num_devices) |
| 145 | { |
| 146 | HeadsetControlStatus status = { 0 }; |
| 147 | status.version = VERSION; |
| 148 | status.api_version = APIVERSION; |
| 149 | status.name = HEADSETCONTROL_NAME; |
| 150 | #if defined(HID_API_VERSION_MAJOR) |
| 151 | // The `hid_version_str()` function is available |
| 152 | status.hid_version = hid_version_str(); |
| 153 | #else |
| 154 | // `hid_version_str()` is not available, return a general version string or number |
| 155 | status.hid_version = "0.0.0"; |
| 156 | #endif |
| 157 | status.device_count = num_devices; |
| 158 | return status; |
| 159 | } |
| 160 | |
| 161 | void initializeHeadsetInfo(HeadsetInfo* info, struct device* device) |
| 162 | { |