Hello!
DLL:
http://host-a.net/u/FatalSleep/JoyStick.dll
SRC:
http://host-a.net/u/FatalSleep/JoyStick.cpp
GML:
http://host-a.net/u/FatalSleep/JoyStick.gml
GEX:
http://host-a.net/u/FatalSleep/JoyStick.gex
GED:
http://host-a.net/u/FatalSleep/JoyStick.ged
EXE:
https://dl.dropboxusercontent.com/u/60402149/JoySticktestApp.exe
The EXE is for testing only.
I have made a DLL(Open Source) for JoyStick support! It works and it works with Game Maker as well! As the title suggests, I have a request.
Could a few people be so kind as to test out my DLL using the following situations:
Test using two or more joysticks / controllers.
Test using a joystick / controller with dual joysticks.
So far I've only been able to test it using a single $10 USB NES joystick that has only a d-pad and four buttons(start, select, A and B). It works and I know for certain, just not in the above cases due to my lack of resources.
I thank you very much for your time and effort!
This DLL was made specifically for GM use, thus all the conversion to double values(GM only supports char and double values). Even though it was made for GameMaker, this DLL should work with anything with DLL support.
Make sure to take a look at the .cpp file to get a grasp on how the functions work. Here is a list of the functions either way though:
JoystickPlugged( double joyid );
JoystickButtons( double joyid, double buttonid );
JoystickJStickL( double joyid, double mode );
JoystickJStickR( double joyid, double mode );
"joyid" : real value ranging from 0-15.
"buttonid" : real value ranging from 0-31.
"mode" : real value ranging from 0-2.
Modes: 0 : x-axis, 1 : y-axis, 2 : joystick button.
In theory the DLL should support 16 controllers and each controller should support 2 joysticks and 32 buttons max!
Terms of Use: Free for commercial and non-commercial use, no credit required.