Silk.NET icon indicating copy to clipboard operation
Silk.NET copied to clipboard

XInput.GetApi() Not Implemented

Open Syncaidius opened this issue 3 years ago • 0 comments

As seen here: https://github.com/dotnet/Silk.NET/blob/23f9bd4d67ad21c69fbd69cc38a62fb2c0ec3927/src/Microsoft/Silk.NET.XInput/XInput.cs#L13

Silk.NET.XInput.XInput.GetApi() Contains throw new NotImplementedException().

EDIT: After a bit of testing and poking around at how APIs are loaded elsewhere in Silk.NET, I found a temporary workaround by manually creating a DefaultNativeContext and passing that into a new XInput instance:

DefaultNativeContext dnc = new DefaultNativeContext("xinput1_3.dll");
_api = new XInput(dnc);

Syncaidius avatar Jun 11 '22 08:06 Syncaidius