[v4 2/4] winejoystick.drv/joystick_osx.c: fixes Slider mapping

Ken Thomases ken at codeweavers.com
Tue Jun 14 03:02:14 CDT 2016


> On Jun 14, 2016, at 2:06 AM, DavidL <david.dljunk at gmail.com> wrote:
> 
> On Mon, Jun 13, 2016 at 11:41 PM, Ken Thomases <ken at codeweavers.com <mailto:ken at codeweavers.com>> wrote:
> On Jun 14, 2016, at 1:23 AM, DavidL <david.dljunk at gmail.com <mailto:david.dljunk at gmail.com>> wrote:
>> *Note: in my testing this is *not* the same for OS X (I guess macOS now) reporting back devices - which human interface device is reported first seems to be random in my testing when I had both a virtual and physical joystick setup. Historically Winmm games would only take input from the first reported device - under Mac-Wine, I've noticed the games seem to be taking input from both my physical and virtual joysticks (sometimes regardless of what the game was saying it was doing!). This has both good and bad potential and is not necessarily behavior we should spend effort trying to get rid of. Not sure how the Linux version behaves in this situation in terms of joystick order and input from multiple sources. 
> 
> It was taking input from both joysticks in the same run?  At the same time?  If so, can you figure out how that's happening?  It really shouldn't, as near as I can see.
> 
> Or was it just arbitrarily picking which was first and therefore active for any given run?  If this, then it's <https://bugs.winehq.org/show_bug.cgi?id=38997 <https://bugs.winehq.org/show_bug.cgi?id=38997>>, more or less.
> 
> As far as I can tell, both. It both arbitrarily picks which is first for any given run (so yes I can definitely confirm that bug report's description) and the game seems to read input from both inputs regardless of which is first - although which is first does still affect the game. I created virtual joystick in Controllermate which I mapped my physical joystick to but mapping X to Y and Y to X, so that when I pulled back on the yoke it would give both an X reading and a Y reading at the same time if it were reading input from both the virtual and physical joystick. In game, that's what happened, even when the trace logs said it was only recording information from one joystick (and in one case, Red Baron, it was explicitly reading from both in the trace log). Which joystick was found first would affect behavior somewhat (hard to describe, basically how out of whack the motions became!), but regardless I could get it sometimes explicitly, sometimes implicitly to read multiple inputs. Maybe this is an anomaly with virtual joysticks. Not sure, shouldn't be. 

Yeah, it might be an issue with the virtual joystick.  Does Apple's HID Calibrator sample code show any similar symptoms?

Alternatively, is there any chance that the game was using both winmm and dinput, and the two had enumerated the devices in a different order?

We could try to fix these bugs by sorting devices by cookie value in both dlls.

-Ken

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160614/fb3ac55f/attachment-0001.html>


More information about the wine-devel mailing list