Hi, Attached is a patch for FGMacOSXEventInput.[ch]xx
Torsten, Could you commit it with the following comments: ----------------------------- Fixed: wrong event name for abs-hat0-y Modified: let AxisElement to generate normalized input (-1.0 to 1.0). This can be temporal and can be removed when AxisEvent normalizes its value. Modified: clean up code Added: some comments so other Mac developers can see what's going on ----------------------------- By the way, I found some differences between Linux and Mac OS X implementation, and want to hear some idea on how to eliminate the differences. 1. button index in FGLinuxEventInput.cxx the button index for misc usage begins from 0, but in USB specification, the index for button (on Button Usage Page) begins from 1 (same in FGMacOSXEventInput.cxx) This difference affects the compatibility (among OSs) of event configuration files. So I'm wondering which way we should follow. Maybe we should follow the linux way since it's easier to convert the existing joystick configuration files into new event configuration files. (button index in a joystick configuration file also begins from 0) What do you guys think? 2. event names for buttons of mice, joysticks (for generic desktop page), and gamepads At this moment, there's no button-left, button-right, etc in Mac OS X implementation. The same is applied for gamepad buttons, and joystick buttons. Instead, the button events are named like button-N regardless of device type. I guess it is easier to assign names in button-N format, but if we really need to clearly state button-left, or button-right, button-a, or button-trigger instead of button-N, then I'll add some code to generate these. I want to note that it is doable on Mac OS X by checking CA type of HID usage, but I'm not so sure if it is one-to-one relationship among HID usage and button names in all devices. if not, we must not use the linux way. We also needs to consider the possible Windows implementation. Any idea on this? Thanks in advance, Tat
FGMacOSXEventInput.diff
Description: Binary data
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel