I'm currently working on a UWP app and I want to be able to take input from a wireless xbox controller however, whenever I try and access it in my code, I get the error System.InvalidOperationException: 'Sequence contains no elements'
.
I know that the controller is connected because it shows up in my bluetooth devices and I can use it in Steam Big Picture and in games without a problem. I'm trying to access the controller using this code:
var controller = Gamepad.Gamepads.First();
var reading = controller.GetCurrentReading();
Am I missing something or doing something wrong?