Yeah., which is why I said they're only Partially Supported.
XInput For Dark BASIC Professional
I decided to have a bit of a look for it.
To install it., what you want to do is copy the DBProXInput.Release.DLL into your %DarkBasicPro%/Compiler/plugins-user/ Folder (Debug doesn't work., which reading through the Thread, the issue seemed to be the opposite for DBP 1.07 when it was originally released; but both will work on DBP 1.06 or Earlier)
You will also need to copy the Editor and Help folders into the DBP Install Folder.
Editor Contains the Keywords, and Help updates the DBP Help as well as includes Examples
Now as a note., a key difference between the Xbox 360 and One Controllers is they're handled differently for Multiple Controllers.
As such, with the Xbox 360 Controller... the Connection Order (Top-Left, Top-Right, Bottom-Left, Bottom-Right) is Controller 0, 1, 2 and 3.
Thus you can have up to 4 Unique Xbox 360 Controllers (and Players) at once.
This doesn't however work with the Xbox One Controller.
Instead if there is 1 Connected, then they're ALL Connected... at least as best as I could tell from playing about with it a bit.
Sync On
Sync Rate 60
Player1 As Integer
Power As Word
Bounce As Boolean
Type Button_Type
X As Boolean
Y As Boolean
A As Boolean
B As Boolean
LShoulder As Boolean
RShoulder As Boolean
LThumb As Boolean
RThumb As Boolean
Up As Boolean
Down As Boolean
Left As Boolean
Right As Boolean
Menu As Boolean
View As Boolean
Start As Boolean
Back Boolean
EndType
Type Trigger_Type
Left As Byte
Right As Byte
EndType
Type Axis_Type
X As Integer
Y As Integer
EndType
Type Rumble_Type
Left As Word
Right As Word
EndType
Type ThumbStick_Type
Left As Axis_Type
Right As Axis_Type
EndType
Type Controller_Type
IsConnected As Boolean
Button As Button_Type
Trigger As Trigger_Type
ThumbStick As ThumbStick_Type
Rumble As Rumble_Type
EndType
Global DIM XboxController(3) As Controller_Type
Do
Cls
If Power <= 0 Then Bounce = 1
If Power >= 65535 Then Bounce = 0
If Controller Connected(Player1)
Set Controller Rumble Left Player1, Power
Set Controller Rumble Right Player1, Power
//Rumble Controller Player1
EndIf
If Bounce
Inc Power, 128
Else
Dec Power, 128
EndIf
For Index = 0 To 3
If XboxController(0).IsConnected = 1
Text 10, 10, "Controller(" + Str$(0) + ") is Connected"
Text 10, 10 * 14, " Menu : " + Str$(XboxController(0).Button.Menu)
Text 10, 10 * 17, " View : " + Str$(XboxController(0).Button.View)
Text 10, 10 * 2, " X : " + Str$(XboxController(0).Button.X)
Text 10, 10 * 3, " Y : " + Str$(XboxController(0).Button.Y)
Text 10, 10 * 4, " A : " + Str$(XboxController(0).Button.A)
Text 10, 10 * 5, " B : " + Str$(XboxController(0).Button.B)
Text 10, 10 * 6, " Up : " + Str$(XboxController(0).Button.Up)
Text 10, 10 * 7, " Down : " + Str$(XboxController(0).Button.Down)
Text 10, 10 * 8, " Left : " + Str$(XboxController(0).Button.Left)
Text 10, 10 * 9, " Right : " + Str$(XboxController(0).Button.Right)
Text 10, 10 * 10, " Left Shoulder : " + Str$(XboxController(0).Button.LShoulder)
Text 10, 10 * 11, " Right Shoulder: " + Str$(XboxController(0).Button.RShoulder)
Text 10, 10 * 12, " Left Thumb : " + Str$(XboxController(0).Button.LThumb)
Text 10, 10 * 13, " Right Thumb : " + Str$(XboxController(0).Button.RThumb)
Text 10, 10 * 15, " Left Trigger : " + Str$(XboxController(0).Trigger.Left)
Text 10, 10 * 16, " Right Trigger : " + Str$(XboxController(0).Trigger.Right)
Text 10, 10 * 18, " Left Stick : X [" + Str$(XboxController(0).ThumbStick.Left.X) + "] : Y [" + Str$(XboxController(0).ThumbStick.Left.Y) + "]"
Text 10, 10 * 19, " Right Stick : X [" + Str$(XboxController(0).ThumbStick.Right.X) + "] : Y [" + Str$(XboxController(0).ThumbStick.Right.Y) + "]"
Else
Text 10, 10, "Controller(" + Str$(0) + ") is Not Connected"
EndIf
Next
SyncControllers( )
Sync
Loop
Function SyncControllers( )
For Index = 0 To 3
If Controller Connected( Index )
XboxController(Index).IsConnected = 1
XboxController(Index).Button.X = Controller Button X( Index )
XboxController(Index).Button.Y = Controller Button Y( Index )
XboxController(Index).Button.A = Controller Button A( Index )
XboxController(Index).Button.B = Controller Button B( Index )
XboxController(Index).Button.Up = Controller Up( Index )
XboxController(Index).Button.Down = Controller Down( Index )
XboxController(Index).Button.Left = Controller Left( Index )
XboxController(Index).Button.Right = Controller Right( Index )
XboxController(Index).Button.LShoulder = Controller Button L( Index )
XboxController(Index).Button.RShoulder = Controller Button R( Index )
XboxController(Index).Button.LThumb = Controller Thumb Left( Index )
XboxController(Index).Button.RThumb = Controller Thumb Right( Index )
XboxController(Index).Trigger.Left = Controller Trigger Left( Index )
XboxController(Index).Trigger.Right = Controller Trigger Right( Index )
XboxController(Index).ThumbStick.Left.X = Controller Thumb Left X(Index)
XboxController(Index).ThumbStick.Left.Y = Controller Thumb Left Y(Index)
XboxController(Index).ThumbStick.Right.X = Controller Thumb Right X(Index)
XboxController(Index).ThumbStick.Right.Y = Controller Thumb Right Y(Index)
XboxController(Index).Rumble.Left = Get Controller Rumble Left( Index )
XboxController(Index).Rumble.Right = Get Controller Rumble Right( Index )
// No idea why, but I never made specific functions for these :\
If (Get Controller Buttons( Index ) && 0x0010) = 0x0010 Then XboxController(Index).Button.Start = 1 Else XboxController(Index).Button.Start = 0
If (Get Controller Buttons( Index ) && 0x0020) = 0x0020 Then XboxController(Index).Button.Back = 1 Else XboxController(Index).Button.Back = 0
// Now we map these to the New Names
XboxController(Index).Button.Menu = XboxController(Index).Button.Start
XboxController(Index).Button.View = XboxController(Index).Button.Back
Else
XboxController(Index).IsConnected = 0
EndIf
Next
EndFunction
As a point-of-note... I don't have the source for it anymore, or at least I don't think it's on any of the HDD that I still own.
For some reason I never added Start and Back as Buttons to directly address (instead you have to get them via the Button Flags), and while it'll tell you if there is a Headset Connected (and it DOES still work with the Xbox One Controller) ... doesn't look like I ever actually got around to implementing capturing / sending audio to it.
Mind they do show up as System Audio Devices (MME / DirectSound) ... so eh, provided you know it's there it should be easy to access; as you know you're looking for Devices called "Xbox Headset" or such.
The Force Feedback does work., but obviously doesn't support the Haptic Force Feedback in the Triggers of the Xbox One Controller (mind it's quite an underused feature of them).
I could probably recreate and update it, if needed.