Switch Pro Controller support for PC

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Jaston
Prole
Posts: 17
Joined: Sun Nov 25, 2018 5:43 pm

Switch Pro Controller support for PC

Post by Jaston » Fri Jan 18, 2019 7:53 pm

I have been trying to get my pro controller to work with love2d. I loaded in all the sdl2 default gamepad mappings but it does the following:

1) does not register gamepad presses
2) indicates not vibration supported

I wondered over to steam and turned on switch pro controller support in steam. Now presses are regustered in love but it is a jumbled mess of input. Its like im holding down buttons when they arent pressed. Also i noticed my controller would rumble in steam.

Anyone else have these troubles or have any luck getting the controller to register and work for pc properly?

User avatar
MissDanish
Citizen
Posts: 59
Joined: Wed Mar 07, 2018 11:21 pm
Location: Denmark

Re: Switch Pro Controller support for PC

Post by MissDanish » Fri Jan 18, 2019 8:34 pm

LÖVE 11.2 and earlier ships with an older version of SDL2 which doesn't support the pro controller, however it should work in the upcoming 11.3 since that ships with the newest SDL2 version. If you're on windows there's an easy fix for this, download the latest SDL2 DLL from the SDL website and go into your LÖVE installation folder and replace the SDL2 DLL in there with the one you just downloaded (this worked for me and I have tested it with my own pro controller)

Edit: one thing that doesn't work though is hot plugging, for some reason my fix doesn't allow for that. I am guessing LÖVE does something on it's end to support that or it's a bug in SDL2.
Provides free hugs :neko:

Jaston
Prole
Posts: 17
Joined: Sun Nov 25, 2018 5:43 pm

Re: Switch Pro Controller support for PC

Post by Jaston » Sat Jan 19, 2019 1:03 am

Thank you for the help :). I currently use the hot swapping in my game just incase a player losses battery or unplugs. Maybe its something they can fix in 11.3 or 11.4

User avatar
MissDanish
Citizen
Posts: 59
Joined: Wed Mar 07, 2018 11:21 pm
Location: Denmark

Re: Switch Pro Controller support for PC

Post by MissDanish » Sun Jan 20, 2019 12:55 am

Jaston wrote:
Sat Jan 19, 2019 1:03 am
Thank you for the help :). I currently use the hot swapping in my game just incase a player losses battery or unplugs. Maybe its something they can fix in 11.3 or 11.4
I've talked to slime on the discord server about getting this working in 11.3, turns out there's some other bug in 11.3 right now that breaks it in a completely different way from what I detailed. This controller should hopefully work in 11.3
Provides free hugs :neko:

User avatar
slime
Solid Snayke
Posts: 2809
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Switch Pro Controller support for PC

Post by slime » Sun Jan 20, 2019 1:16 am

Specifically, the third-party libraries love uses on Windows are built using CMake when love is built, but SDL's new joystick code which includes better Switch Pro controller support doesn't get compiled in when you build SDL with CMake. I'll need to modify SDL's CMake generator file to fix it.

Post Reply

Who is online

Users browsing this forum: ChicoGameDev, Exabot [Bot], keharriso, yoki and 6 guests