You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @mfakane, I'm trying to use your wrapper to receive raw input from game controllers. Here's an example controller I'm trying to read:
I've tried to modify SimpleExample to use either HidUsageAndPage.Joystick or HidUsageAndPage.Gamepad, but there is a Win32ErrorException. RegisterRawInputDevices returns false with GetLastError = 87, which is "The parameter is incorrect.".
I also tried to directly access it like this as well:
try{// Register the HidUsageAndPage to watch any device.RawInputDevice.RegisterDevice(devices[0].UsageAndPage,RawInputDeviceFlags.ExInputSink|RawInputDeviceFlags.NoLegacy,window.Handle);Application.Run();}finally{RawInputDevice.UnregisterDevice(devices[0].UsageAndPage);}
I'm not sure if it's correct, but it returns the same error. What am I supposed to do?
The text was updated successfully, but these errors were encountered:
Is your window (or _window in my example) instance still valid, when you call RegisterDevice? I.e. that it is not out of scope and being garbage collected?
Hi @mfakane, I'm trying to use your wrapper to receive raw input from game controllers. Here's an example controller I'm trying to read:
I've tried to modify SimpleExample to use either
HidUsageAndPage.Joystick
orHidUsageAndPage.Gamepad
, but there is aWin32ErrorException
.RegisterRawInputDevices
returnsfalse
withGetLastError = 87
, which is"The parameter is incorrect."
.I also tried to directly access it like this as well:
I'm not sure if it's correct, but it returns the same error. What am I supposed to do?
The text was updated successfully, but these errors were encountered: