I am trying to use DirectInput to capture XBOX One controller input signals. I am tying it to a C# WinForms application. The issue I am having is: When the form has focus, it captures inputs just fine. When the window loses focus, I don't get any feedback. On Windows 7, this isn't an issue.
I have tried other controllers on Windows 10: PS4, Logitech, Steering Wheels, etc... Everything works as expected: When the window loses focus, I still get feedback. It's just the XBOX One controller on Windows 10.
I thought maybe it had something to do with this line:
dev.SetCooperativeLevel(_ctlParent, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
But, even if I take that line out, everything still acts the same.
It seems like the XBOX One controller ignores the CooperativeLevel.Background
flag and adds the CooperativeLevel.Foreground
flag. Here is some more info about the flags.
Is there anyone else familiar with this issue that has figured out a work around?