http://bugs.winehq.org/show_bug.cgi?id=18424
--- Comment #65 from Mr Nobody limited_choice@hotmail.com 2011-06-26 20:37:35 CDT --- (In reply to comment #64)
I have also done next to no high level Mac OS X (or other OS) programming. My regular programming consists of working on linkers, dynamic instrumentation tools and compiler components.
But it's really not that hard. For the Mac OS X HID stuff, look at the HID Calibrator stuff I mentioned in comment 39, the HID headers (/System/Library/Frameworks/IOKit.framework/Headers/hid and .../hidsystem) and the existing code in joystick_osx.c. I also found the USB HID documentation useful for background information: http://www.usb.org/developers/devclass_docs/Hut1_11.pdf
The Linux DirectInput code is in joystick_linuxinpuc.c, the winmm code in joystick_linux.c. The code in both files seemed fairly similar at first sight. In fact, at first I had no idea why both were present and while searching for their purpose I found a thread on wine-devel where someone proposed merging them (but that was deemed to be not that easy because of the differences in models between winmm and dinput).
Hehe, don't worry - when I was actively into code it was 25+ years ago, involved BCPL and for the most part was mooted in the industrial sector ; I'm a real fish out of water around here most of the time ;)
Thanks for the additional clarity above -- I walked the same code and discovered the same things (but didn't find the wine-devel posting explaining why the two portions were being kept apart, thanks for that)... but at any rate, I figured I was looking at a whole new OSX portion needing to be done. In fact, doesn't the logic here maintain that the existing 'joystick_osx.c' should be renamed to 'joystick_osxinput.c' (this would follow the functional/namespace conventions of joystick_linuxinput.c). Likewise, if the code portion for winmm is in joystick_linux.c then same should be so for OSX with a new portion to support winmm in that? (which would be the namespace 'joystick_osx.c')...
...it was about there I muttered "Oh dear" to myself, and realized it was beyond my own experience. I might ask Aric about same ; he's much more familiar with these things and will know where the winmm stuff should go... oh, and should you find the time/inclination to look further at this and need an example win32 game to do same with, let me know - I'll happily purchase a candidate for you 8)