Lines Matching refs:pDevice
177 GetHIDElementState(recDevice *pDevice, recElement *pElement, SInt32 *pValue) in GetHIDElementState() argument
182 if (pDevice && pDevice->deviceRef && pElement) { in GetHIDElementState()
184 …if (IOHIDDeviceGetValue(pDevice->deviceRef, pElement->elementRef, &valueRef) == kIOReturnSuccess) { in GetHIDElementState()
203 GetHIDScaledCalibratedState(recDevice * pDevice, recElement * pElement, SInt32 min, SInt32 max, SIn… in GetHIDScaledCalibratedState() argument
208 if (GetHIDElementState(pDevice, pElement, pValue)) in GetHIDScaledCalibratedState()
257 AddHIDElements(CFArrayRef array, recDevice *pDevice) in AddHIDElements() argument
260 CFArrayApplyFunction(array, range, AddHIDElement, pDevice); in AddHIDElements()
278 recDevice *pDevice = (recDevice *) parameter; in AddHIDElement() local
306 if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { in AddHIDElement()
309 pDevice->axes++; in AddHIDElement()
310 headElement = &(pDevice->firstAxis); in AddHIDElement()
316 if (!ElementAlreadyAdded(cookie, pDevice->firstHat)) { in AddHIDElement()
319 pDevice->hats++; in AddHIDElement()
320 headElement = &(pDevice->firstHat); in AddHIDElement()
331 if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { in AddHIDElement()
334 pDevice->buttons++; in AddHIDElement()
335 headElement = &(pDevice->firstButton); in AddHIDElement()
348 if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { in AddHIDElement()
351 pDevice->axes++; in AddHIDElement()
352 headElement = &(pDevice->firstAxis); in AddHIDElement()
364 if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) { in AddHIDElement()
367 pDevice->buttons++; in AddHIDElement()
368 headElement = &(pDevice->firstButton); in AddHIDElement()
382 AddHIDElements(array, pDevice); in AddHIDElement()
413 pDevice->elements++; in AddHIDElement()
420 GetDeviceInfo(IOHIDDeviceRef hidDevice, recDevice *pDevice) in GetDeviceInfo() argument
430 Uint16 *guid16 = (Uint16 *)pDevice->guid.data; in GetDeviceInfo()
435 CFNumberGetValue(refCF, kCFNumberSInt32Type, &pDevice->usagePage); in GetDeviceInfo()
437 if (pDevice->usagePage != kHIDPage_GenericDesktop) { in GetDeviceInfo()
443 CFNumberGetValue(refCF, kCFNumberSInt32Type, &pDevice->usage); in GetDeviceInfo()
446 if ((pDevice->usage != kHIDUsage_GD_Joystick && in GetDeviceInfo()
447 pDevice->usage != kHIDUsage_GD_GamePad && in GetDeviceInfo()
448 pDevice->usage != kHIDUsage_GD_MultiAxisController)) { in GetDeviceInfo()
461 pDevice->deviceRef = hidDevice; in GetDeviceInfo()
489 SDL_strlcpy(pDevice->product, name, sizeof(pDevice->product)); in GetDeviceInfo()
494 if (HIDAPI_IsDevicePresent(vendor, product, version, pDevice->product)) { in GetDeviceInfo()
500 SDL_memset(pDevice->guid.data, 0, sizeof(pDevice->guid.data)); in GetDeviceInfo()
514 SDL_strlcpy((char*)guid16, pDevice->product, sizeof(pDevice->guid.data) - 4); in GetDeviceInfo()
519 AddHIDElements(array, pDevice); in GetDeviceInfo()