raylib-d Gamepad Detection Fails

jwatson-CO-edu real.name at colorado.edu
Wed Nov 30 22:46:52 UTC 2022


Hello,

I have this small [gamepad input test 
program](https://github.com/jwatson-CO-edu/nanoverse/blob/main/d/raylib/04_jsInput/source/app.d).  In the program, I poll the first 3 gamepad IDs, but all detection attempts return `false`. I know that my gamepad is an Xinput model.  I have tried starting the program before and after the gamepad is plugged in, but there is no change.

Sample:
```d
bool GP0_found = IsGamepadAvailable(0); // false
bool GP1_found = IsGamepadAvailable(1); // false
bool GP2_found = IsGamepadAvailable(2); // false
```

Has anyone else experienced this and know the fix?


More information about the Digitalmars-d-learn mailing list