Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 6552ec8

Browse files
amerkolecixoofx
authored andcommitted
XInput fix (#944)
XInput fix loading dll when running net standard and net desktop. Fix XInput9_1_0 not being loaded correctly. * Missing commit
1 parent 8f03cb4 commit 6552ec8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Source/SharpDX.XInput/Controller.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public bool IsConnected
163163
}
164164
}
165165

166-
#if DESKTOP_APP
166+
#if !WINDOWS_UWP
167167
static Controller()
168168
{
169169
if(LoadLibrary("xinput1_4.dll") != IntPtr.Zero)
@@ -176,7 +176,7 @@ static Controller()
176176
}
177177
else if (LoadLibrary("xinput9_1_0.dll") != IntPtr.Zero)
178178
{
179-
xinput = new XInput13();
179+
xinput = new XInput910();
180180
}
181181
}
182182

Source/SharpDX.XInput/XInput13.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
// THE SOFTWARE.
20-
#if DESKTOP_APP
20+
#if !WINDOWS_UWP
2121

2222
using System;
2323
using System.Runtime.InteropServices;

Source/SharpDX.XInput/XInput910.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
// THE SOFTWARE.
20-
#if DESKTOP_APP
20+
#if !WINDOWS_UWP
2121
using System;
2222
using System.Runtime.InteropServices;
2323
using SharpDX.Mathematics.Interop;

0 commit comments

Comments
 (0)