Open borbware opened 3 years ago
I'm not sure it will be possible to detect controller type in the future. Also, please look at SUPER MEAT BOY TIC-80 DEMAKE https://tic80.com/play?cart=1512, it has interesting input type detection on startup. Thanks.
yeah, i'm using similar trickery myself. ofc, i could just make my own button mapping screen where i could also make the player choose the icons they want to use for the controller buttons.
It seems this is actually (almost) fixed on 0.80. The ABXY buttons are mapped correctly, but dpad is not working anymore, and the ESC is mapped to the L3 button, instead of Start. I've expanded on the matter here.
Correction: this is not about the PS4 controller, it's more general.
I could reproduce the issue with an USB-connected SN30 pro (XINPUT controller). When the same controller was connected via bluetooth, the dpad started working.
So to wrap-up:
ps4 controller working fine here I'm using 1.0.19360 dev
@borbware is this still an issue?
Oh, I'll let you know when I've managed to check it with my PS5 controller.
On the PS4 controller, TIC-80 maps controls as
A better mapping would be
Also, would it be possible to detect from code if a PS4 controller is connected so you could use sprites of the triangle, circle, square, cross buttons in-game to represent the buttons?
Or rather, detect if there was any controller at all! I'm now using a checker function with a logic of "was a
btnp
and a correspondingkeyp
pressed at the same time? If not, then input must be coming from a controller".... It works 90% of the time!