Closed luqiming666 closed 1 year ago
Nothing comes to mind...the sample is running here for me on Win11 with an Xbox controller. What version of GameInputRedist.dll is installed? You'll find this in \windows\system32. How was GameInput installed, from the GDK or some other way? What version of the GDK are you building against? Any failure HRESULTs coming back from any of the APIs like GameInputCreate or GetCurrentReading?
I installed GDK-October_2022_Update_2.
GameInputRedist.dll,File version 0.2210.22621.1863 (Code signature 2022/11/11) GameInput.dll,File version 0.2204.22621.1265 (Code signature 2023/1/31)
GameInputCreate and GetCurrentReading are both successful. Actually I didn't see any HRESULT failures.
BTW, I tested XInput Sample: RumbleController. It works perfectly well on the same PC.
Those look correct. Are you connecting over USB or Bluetooth?
Those look correct. Are you connecting over USB or Bluetooth?
Bluetooth. Is there any debugging mechnism we can use to figure out the problem? I can capture necessary logs and hand over to you.
Unfortunately, GameInput currently does not support an Xbox One/Series controller connected via Bluetooth on PC. It will only work when connected via USB. There is a known issue and will be rectified in a future version of GameInput. For now, you will need to connect your controller via USB for it to function on PC with GameInput.
Thank you for your quick reply. Look forward to the GameInput update...
if anybody comes across this problem, you have to call Release() on the reading at some point, otherwise it stops reading.
like this:
m_reading->GetGamepadState(&state)
m_reading->Release();
Ran into this as well. Still not fixed as of this moment.
I was running the sample project: Samples\System\Gamepad. It didn't work as expected. I'm sure I've connected a Xbox Series X/S console to my Win11 PC, and "GameInput Service" is running.
But no matter which key I press on the gamepad, m_reading->GetGamepadState always returns empty state and state.buttons equals to 0 all the time. A bit weird... Any clue?