Re: [Plib-devel] Windows, multiple joystick support
Brought to you by:
sjbaker
From: Fay J. F Dr C. U. AFSEO/SK <joh...@eg...> - 2006-12-21 20:55:59
|
Jonah, Hello and welcome to the PLIB development community. Thank you for the patch. I had a question about the platform-independence of your patch, but it seems that at least the BSD code supports more than one joystick. So that appears not to be an issue. Your timing is superb; I am leaving for a week in about two hours. If anybody has a heartburn over this patch, please either let me know prestissimo, wait a week, or ask somebody else to take it out. Incidentally, a different patch format would help people. In that format (which you can get in Linux with a "diff -u" command, I think), unchanged lines are unmarked, lines that are deleted are preceded by a "-", and lines that are added are preceded by a "+". John F. Fay Technical Fellow Jacobs/Sverdrup TEAS Group 850-883-1294 -----Original Message----- From: pli...@li... [mailto:pli...@li...] On Behalf Of Jonah Williams (RIT Student) Sent: Thursday, December 21, 2006 2:36 PM To: pli...@li... Subject: Re: [Plib-devel] Windows, multiple joystick support Would a member of the devel list be kind enough to grant me access to commit changes to subversion or commit the following patch for me? In jsWindows.cxx I suggest replacing the current constructor with the following code to allow support for more than 2 joystick devices. Windows 95 and higher support at least 16 devices and there does not seem to be any reason why plib should artificially limit itself to only 2. jsJoystick::jsJoystick ( int ident ) { id = ident ; os = new struct os_specific_s; if (ident >= 0 && ident < joyGetNumDevs()) { os->js_id = JOYSTICKID1 + ident; open(); } else { num_axes = 0; setError(); } } joyGetNumDevs() is documented here: http://msdn2.microsoft.com/en-us/library/ms709351.aspx Thanks, -Jonah (sourceforge account "jw_rit") |