OS X controller issue

So I’m using a Dualshock 4 on my MacBook Pro, and I’ve used it both wired and wirelessly with the same bug I’m about to explain.

I want to play Gran Turismo 2 using Mednafen PSX, and it runs great so far. But the Dualshock 4 removed the analog face buttons that had been on Dualshocks 1-3, which were very useful for Gran Turismo, and so I changed the in-game settings to use the right analog stick for acceleration and braking. (push up to accelerate, down to brake)

This almost works, but there’s a strange bug: when I push the stick all the way forward to accelerate, it overflows and goes to full brake instantly. I can see in the replay which shows the controls, acceleration steadily rises, and then right as it hits the top, acceleration disappears and full brake is applied.

So is there an issue where 255=0 in the input drivers?

I just tested to make sure, and yes, there’s a similar issue with turning on the left stick, pushing left all the way is a hard right turn. I have the controller set to emulate a Dualshock, if that helps.

Thanks for reading!

Edit: With further experimentation, I realize that for the DS4, up on the right stick and left on the left stick are both negative directions, so this is really a case of 0=256, not 255=0.