SFML community forums

Help => General => Topic started by: AshleyF on July 21, 2016, 05:50:00 pm

Title: Bug with a PS4 controller on the Mac
Post by: AshleyF on July 21, 2016, 05:50:00 pm
Dear All,

I've detected a bug with SFML and its joystick routines on the Mac.

Plug in a PS4 controller via an appropriate usb cable.

Get SFML to detect all the buttons.

Bug is:

It counts 14 but misses the up/down/left/right buttons on the top left of the controller. So it should detect 18, but other than that, everything works fine.

I know that it's an error with SFML as I tested the PS4 controller with an old GLFW program I wrote, and that detected all the buttons appropriately.

If anyone can fix this bug, then I'd be most grateful.

Kind regards,

AshleyF
Title: Re: Bug with a PS4 controller on the Mac
Post by: G. on July 21, 2016, 06:44:59 pm
Aren't they PovX and PovY axis?
Title: Re: Bug with a PS4 controller on the Mac
Post by: AshleyF on July 21, 2016, 06:52:32 pm
Dear G.

Unfortunately they are not as I checked that.

According to the GLFW program I wrote, they are read as buttons only.

Kind regards,

AshleyF
Title: Re: Bug with a PS4 controller on the Mac
Post by: K.F on July 21, 2016, 07:39:48 pm
It counts 14 but misses the up/down/left/right buttons on the top left of the controller. So it should detect 18,

I know nothing about mac, but the controller has only 14 digital buttons including the d-pad - not counting the PS button and clickable touch screen -, the rest are analogue.
Title: Re: Bug with a PS4 controller on the Mac
Post by: Hapax on July 21, 2016, 10:47:41 pm
The d-pad "buttons" of a PlayStation 4 controller are analogue, aren't they?
Title: Re: Bug with a PS4 controller on the Mac
Post by: K.F on July 22, 2016, 07:09:24 am
The d-pad "buttons" of a PlayStation 4 controller are analogue, aren't they?

Nope, only PS2, and PS3 controllers have analogue face buttons. Sony dropped it for the PS4, and went back to pure digital since almost no one used them.
Title: Re: Bug with a PS4 controller on the Mac
Post by: Hapax on July 22, 2016, 04:02:50 pm
Makes sense. Just makes people press it harder :)