JoystickWrapper | DLL wrapper using SharpDX , to replace AHK | Cybersecurity library
kandi X-RAY | JoystickWrapper Summary
kandi X-RAY | JoystickWrapper Summary
A C# DLL wrapper using SharpDX, to replace AHK's joystick functionality
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of JoystickWrapper
JoystickWrapper Key Features
JoystickWrapper Examples and Code Snippets
Community Discussions
Trending Discussions on JoystickWrapper
QUESTION
I am currently writing a .Net DirectInput wrapper DLL to allow event-based reporting of stick input from other languages (I am using AutoHotkey).
I currently use SharpDX to read stick data, but SharpDX only seems to report how many axes a stick reports, not which axes a stick reports.
For example, it is entirely possible for a stick to have 7 axes, but no X axis (You can see this by installing vJoy and configuring which axes it has - in the vJoy configuration utility, untick the X axis. Notice in joy.cpl that the X axis is gone).
Reading the stick caps via SharpDX (Using eg SharpDX.DirectInput.Joystick.Capabilities.AxeCount
), there seems to be no way to tell that the missing axis is X.
Is the underlying DirectInput API able to represent this info, or would I have to go to something like RawInput to get at this info?
ANSWER
Answered 2017-Mar-16 at 12:13So I worked this one out for myself.
Using SharpDX, you can use Joystick.GetObjectPropertiesByName("X")
where "X" is the name of an axis. You can call ToString()
on a JoystickOffset
to get the name of the axis.
If you do this in a try
block, then if it hits the catch, that axis does not exist on that stick.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JoystickWrapper
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page