Xinput for Love (Real Xbox controller support) BETA

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.
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

Yeah I know. I'm going to look at addressing that via a lua library. Since the triggers and buttons all work correctly, it's a simple matter of remapping them, if I know it's the right controller. But right now that driver reports the controller as just "Controller". I'm going to see about talking with the driver writer and seeing if he can report something a little more useful, and then from there it's easy to translate the buttons/analogs to expected values.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Nixola »

If I could run the test, I'd check if it works with a non-360 controller (is a PSP ok?)
Error loading module 'XInputLUA' from file '.\XinputLUA.dll':
The specified module could not be found.
If I rename the file to "XINPUT1_3.dll" (I also get a Windows error that says that it can't find that file) I get the following error and, before LOVE opens, a Windows error (The ordinal 2 could not be located in the dynamic library XINPUT1_3.dll):
Error loading module 'XINPUT1_3' from file '.\XINPUT1_3.dll':
The operating system cannot run %1.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

Do you have XInputLUA.dll next to your love.exe? Because that's where it needs to be.

You *should* have XInput1_3.dll or XInput1_4.dll on your system. If you've installed your xbox controller before, those should hopefully be... somewhere. Otherwise I'll have to look into finding the redistributable versions.

edit: if it does complain about XInput1_3.dll without you renaming anything, try installing http://www.microsoft.com/en-us/download ... aspx?id=35
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Nixola »

I didn't ever link anything except the Wiimote and the PSP as controllers, I extracted the project inside the LOVE folder twice (so I have love.exe, the .love, xinput and the .love extracted inside %PROGRAMFILES%/LOVE)

P.S: I already have DirectX installed
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

Nixola wrote:I didn't ever link anything except the Wiimote and the PSP as controllers, I extracted the project inside the LOVE folder twice (so I have love.exe, the .love, xinput and the .love extracted inside %PROGRAMFILES%/LOVE)

P.S: I already have DirectX installed
Ah. Well, this is specifically for Xbox 360 controllers. It should still function... somewhat, but it will require the XInput dlls to be installed from MS. If you haven't installed directx recently, you can try again (depending on your version it might not have the xinput libs). If that doesn't work you may need to find and plug in a 360 controller so that windows manages to dig up the DLL and install it properly on your system.

Otherwise, if you can find the xinput1_3.dll, you can probably just also drop that next to your love.exe.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Nixola »

I have some wired X360 controllers, I'll try to plug them and then retry
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

Nixola wrote:I have some wired X360 controllers, I'll try to plug them and then retry
Okay. I'm very interested to know if it works after you've done that. Honestly I'm not sure how XInput gets on to the end user's machine most of the time, I though it was automatic but maybe I have to distribute the dll myself, or load it manually from within my own DLL.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Nixola »

I plugged it in and it works, but LOVE still doesn't find XIPNUT1_3
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

Nixola wrote:I plugged it in and it works, but LOVE still doesn't find XIPNUT1_3
Okay, I'll try and look into this.
User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: Xinput for Love (Real Xbox controller support) BETA

Post by Charles Randall »

On my machine, I have XInput1_3.dll in two places, which is how my app is using them. They are in:

c:\Windows\System32\xinput1_3.dll
c:\Windows\SysWOW64\xinput1_3.dll

The version that my DLL is loading is from SysWOW64, probably because I'm on a 64bit machine.

Can you see if you have those dlls in those locations? If you do, can you run procmon.exe from Sysinternals and track the file accesses coming from love.exe and let me know what it shows?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests