Hi Andrew,

> I have written the following but when I have dwUserIndex as 0,1,2,3 or
> any number, doesn't really matter, it always returns
> ERROR_BAD_ARGUMENTS.

Not sure why it's not returning ERROR_DEVICE_NOT_CONNECTED for you.
I'll just point out:

> DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE* pState)
> {
>    FIXME("Stub - Controller: %d \n", dwUserIndex);
>
>    if (dwUserIndex >= 0 && dwUserIndex < 4) {
>        return ERROR_DEVICE_NOT_CONNECTED;

The first part of this is always true, since DWORD is unsigned.  You
can write this more simply as:
  if (dwUserIndex < 4) { ... }

--Juan


Reply via email to