"Arcade Pad (Street Fighter IV FightPad)" with love.joystick

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.
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

"Arcade Pad (Street Fighter IV FightPad)" with love.joystick

Post by immakinggames »

Hi, this pad is not discovered when looking for it with love.joystick.getJoysticks():

http://blogs.evtrib.com/nerdvana/files/ ... hun_li.jpg

Other controllers do show up, and the controller is being seen by the OS (and the inputs are perfectly fine), so I can only assume that this controller is for some reason not being discovered by love.joystick.

Is there any way to remedy this?

EDIT:
0.8.0 had received inputs from this pad, so I definitely assume it has something to with the new joystick API
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by ejmr »

I have that exact gamepad. Could you please post a '*.love' file of your code attempting to use it so that we can help you debug any problems?
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by immakinggames »

well I actually have the xbox version, and I'll just post something I'm doing to test now which is a small amount of code.

Code: Select all

g.print(love.joystick.getJoystickCount(), 0, 30)
this is always one or greater with any joystick I plug in EXCEPT the fightpad (despite it showing up on my OS fine and playing fine with other games).

EDIT:
Just tried on another computer, still not showing up (OS is Windows 8 across both machines). I'm pretty certain at this point that the joystick API cannot detect this controller.
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by immakinggames »

Sorry to bump, but new info.

I just checked with a Windows 7 machine now and I still get the same result: Every controller is detected except the arcade pad. Once again the controller worked fine in other games.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by slime »

love.joystick uses SDL 2's joystick APIs for its backend. SDL 2 on Windows uses both Xinput and DirectInput as its platform-specific backend for joystick functionality.
Maybe SDL has a bug which prevents that particular joystick from being recognized, or maybe it just can't be recognized by Xinput or DirectInput with the drivers you're using. In either case, there isn't much that can be done in LÖVE's own codebase to help.

LÖVE 0.8.0 used SDL 1, which was largely written in the 1990's and its Windows backend for joystick support used a similarly ancient Microsoft API (which has been deprecated by Microsoft in favor of DirectInput and Xinput for many years now.) That might explain why it works in 0.8.0.
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by immakinggames »

Fair enough, thanks for the response. However, I find this SDL problem really hard to believe based on the fact that every game (new or old) recognizes this controller, even games that say they only exclusively support 360 gamepads. Is it really completely out of the question that this could be a bug within the API or how LOVE is handling SDL?
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by slime »

immakinggames wrote:every game (new or old) recognizes this controller, even games that say they only exclusively support 360 gamepads. Is it really completely out of the question that this could be a bug within the API or how LOVE is handling SDL?
LÖVE really just calls SDL's functions and uses SDL's events, for some things (including the entire Joystick API.) Have you tried testing whether the controller is recognized in Steam's Big Picture mode? It uses SDL 2.
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by immakinggames »

Confirmed to NOT be working with Big Picture mode. Thanks for clearing that up! I guess a lot of developers still use SDL1 for games. Street Fighter 4 is interesting in particular, because it can both retrieve the name (which I assume is an SDL2 thing and not possible with SDL1) and receive input from this pad.

are there any plans to allow developers to go back to SDL1 if they so desire? Something you can turn on or off in conf.lua? If SDL2 straight up ignores some modern game pads like this, LOVE could really benefit from having an alternative.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by slime »

immakinggames wrote:it can both retrieve the name (which I assume is an SDL2 thing and not possible with SDL1) and receive input from this pad.
The name can be retrieved in SDL 1 too.
immakinggames wrote:are there any plans to allow developers to go back to SDL1 if they so desire? Something you can turn on or off in conf.lua? If SDL2 straight up ignores some modern game pads like this, LOVE could really benefit from having an alternative.
Definitely not. SDL 2 is a huge improvement from SDL 1 - and not backwards compatible. It added a great deal of features, resolved many bugs (some caused by the way the SDL 1 API was designed), and restructured a lot of its APIs. Many of the API changes in LÖVE 0.9.0 directly match those of SDL 1 -> 2. Even if it was feasible, I would not go back to SDL 1 in a million years.
immakinggames
Prole
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

Re: "Arcade Pad (Street Fighter IV FightPad)" with love.joys

Post by immakinggames »

slime wrote: Even if it was feasible, I would not go back to SDL 1 in a million years.
Just found out SDL2 doesn't work any of MadCatz arcade sticks (the most popular arcade sticks on the market). This makes LOVE beyond 0.8.0 not suitable for Fighting Games/SHMUPs. That's kind of shame, specifically for what I'm doing. I guess that's somewhat understandable given the problematic nature of SDL1, but for me the pros cannot possibly outweigh that con. Thanks for the info.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], whatevers and 38 guests