(08-29-2010, 01:55 PM)Billiard26 Wrote: [ -> ]Give r6143 a try. I made some changes to the DInput stuff.
Hello,
I tried 6143, but it still doesn't work.
I'll try to setup the environment tonight and checkout the code from the SVN. Can you give me pointers as to where/what to look for in the code and I can debug it myself?
I'm a software engineer and a developer for a big software company, so I know what I'm doing
I'll try to join the IRC channel as well
Thanks again for your help!
Well, the problem is in "Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp".
My code thinks your gamepad supports buffered input and is attempting to use it.
The value of m_must_poll should be set to true when a gamepad doesn't support buffered data and polling must be used.
This should be determined at lines 195-210, but apparently that code isn't good enough.
If you change those lines to just "m_must_poll = true;" it should work with your gamepad, but I don't want to do that.
I want to use buffered data whenever possible. (some pads apparently don't work well with polling)
Could you check if the GetDeviceData() call at line 356 is returning DIERR_NOTBUFFERED with your gamepad?
If so, we could use that as a check for buffered data being unsupported.
DirectInput is such a pain, you need to do all sorts of stupid things to support all gamepads. :p
(08-31-2010, 04:15 AM)Billiard26 Wrote: [ -> ]Well, the problem is in "Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp".
My code thinks your gamepad supports buffered input and is attempting to use it.
The value of m_must_poll should be set to true when a gamepad doesn't support buffered data and polling must be used.
This should be determined at lines 195-210, but apparently that code isn't good enough.
If you change those lines to just "m_must_poll = true;" it should work with your gamepad, but I don't want to do that.
I want to use buffered data whenever possible. (some pads apparently don't work well with polling)
Could you check if the GetDeviceData() call at line 356 is returning DIERR_NOTBUFFERED with your gamepad?
If so, we could use that as a check for buffered data being unsupported.
DirectInput is such a pain, you need to do all sorts of stupid things to support all gamepads. :p
Hello,
Even if I force it to true with the debugger, it still doesn't work and recognize any control.
Also, GetDeviceData() returns :
hr 0x8007000c The access code is invalid. HRESULT
I didn't have time to play around with it much and I'll try to logon the IRC channel later this week when I can.
It seems like it's adding the device properly though, going through the AddInput methods right after that...
Thanks
0x8007000c should be DIERR_NOTACQUIRED.
"Even if I force it to true with the debugger, it still doesn't work and recognize any control."
Try forcing it to true by replacing lines 195-210 with "m_must_poll = true;".
If that doesn't work, the problem isn't buffered vs polled data.
(08-31-2010, 02:14 PM)Billiard26 Wrote: [ -> ]0x8007000c should be DIERR_NOTACQUIRED.
"Even if I force it to true with the debugger, it still doesn't work and recognize any control."
Try forcing it to true by replacing lines 195-210 with "m_must_poll = true;".
If that doesn't work, the problem isn't buffered vs polled data.
Well, that doesn't work, even if I replace "m_must_poll = true;"..
Although it was working fine in 5618 and not in 5619, it must be something else that was changed between the 2 revisions...
In 5618, I can see the DInput pad in the dropdown list, but not the SDL one... In 5619, I can see both, but only the SDL one is working, not the DInput one... Is it possible that it prevents the DInput one from working if it recognizes another working gamepad?
Thanks!
I guess it's possible SDL is making DirectInput not work.
Try disabling SDL from the build. Comment out the "#define CIFACE_USE_SDL" line in "ControllerInterface.h".