[Plib-cvs] plib/src/js jsMacOSX.cxx,1.1,1.2
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-03-18 17:30:31
|
Update of /cvsroot/plib/plib/src/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19225/plib/src/js Modified Files: jsMacOSX.cxx Log Message: Added some changes that John Fay requested: 1) Fixed MacOSX joystick code to resemble a fix that was applied to freeglut. 2) Provided a test to prevent some puAux widgets from being incorrectly activated on a key release. Index: jsMacOSX.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/js/jsMacOSX.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jsMacOSX.cxx 4 Jan 2003 02:55:54 -0000 1.1 +++ jsMacOSX.cxx 18 Mar 2004 17:20:52 -0000 1.2 @@ -87,15 +87,18 @@ CFTypeRef refUsage = CFDictionaryGetValue (properties, CFSTR(kIOHIDPrimaryUsageKey)); CFNumberGetValue((CFNumberRef) refUsage, kCFNumberLongType, &usage); CFNumberGetValue((CFNumberRef) refPage, kCFNumberLongType, &page); - - // exclude keyboard / mouse devices - if ((page == kHIDPage_GenericDesktop) && - ((usage == kHIDUsage_GD_Keyboard) || (usage == kHIDUsage_GD_Mouse)) - ) - continue; - - // add it to the array - ioDevices[numDevices++] = ioDev; + + if ( (page == kHIDPage_GenericDesktop) && + ((usage == kHIDUsage_GD_Joystick) || + (usage == kHIDUsage_GD_GamePad ) || + (usage == kHIDUsage_GD_MultiAxisController) || + (usage == kHIDUsage_GD_Hatswitch) // last two necessary ? + ) + ) + { + // add it to the array + ioDevices[numDevices++] = ioDev; + } } IOObjectRelease(hidIterator); |