Mercurial > sdl-ios-xcode
comparison src/joystick/darwin/SDL_sysjoystick.c @ 210:582abf60e21e
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 18 Oct 2001 15:07:09 +0000 |
parents | c995b877bc5b |
children | e8157fcb3114 |
comparison
equal
deleted
inserted
replaced
209:c995b877bc5b | 210:582abf60e21e |
---|---|
89 | 89 |
90 recElement* firstAxis; | 90 recElement* firstAxis; |
91 recElement* firstButton; | 91 recElement* firstButton; |
92 recElement* firstHat; | 92 recElement* firstHat; |
93 | 93 |
94 struct recDevice* pNext; // next device | 94 struct joystick_hwdata* pNext; // next device |
95 }; | 95 }; |
96 typedef struct joystick_hwdata recDevice; | 96 typedef struct joystick_hwdata recDevice; |
97 | 97 |
98 | 98 |
99 /* Linked list of all available devices */ | 99 /* Linked list of all available devices */ |
498 HIDGetDeviceInfo (hidDevice, hidProperties, pDevice); /* hidDevice used to find parents in registry tree */ | 498 HIDGetDeviceInfo (hidDevice, hidProperties, pDevice); /* hidDevice used to find parents in registry tree */ |
499 HIDGetCollectionElements (hidProperties, pDevice); | 499 HIDGetCollectionElements (hidProperties, pDevice); |
500 } | 500 } |
501 else | 501 else |
502 { | 502 { |
503 DisposePtr(pDevice); | 503 DisposePtr((Ptr)pDevice); |
504 pDevice = NULL; | 504 pDevice = NULL; |
505 } | 505 } |
506 CFRelease (hidProperties); | 506 CFRelease (hidProperties); |
507 } | 507 } |
508 else | 508 else |
509 { | 509 { |
510 DisposePtr(pDevice); | 510 DisposePtr((Ptr)pDevice); |
511 pDevice = NULL; | 511 pDevice = NULL; |
512 } | 512 } |
513 } | 513 } |
514 return pDevice; | 514 return pDevice; |
515 } | 515 } |
722 | 722 |
723 element = device->firstHat; | 723 element = device->firstHat; |
724 i = 0; | 724 i = 0; |
725 while (element) | 725 while (element) |
726 { | 726 { |
727 Uint8 pos; | 727 Uint8 pos = 0; |
728 | 728 |
729 value = HIDGetElementValue(device, element); | 729 value = HIDGetElementValue(device, element); |
730 switch(value) | 730 switch(value) |
731 { | 731 { |
732 case 0: | 732 case 0: |