Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Added experimental command to query xinput index #2070

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion DS4Windows/DS4Forms/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam,
{
// Name of the property to query from a profile or DS4Windows app engine
propName = strData[2].ToLower();

if (propName == "profilename")
{
if (Global.useTempProfile[tdevice])
Expand Down Expand Up @@ -1267,6 +1267,15 @@ private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam,
propValue = App.rootHub.OutputslotMan.OutputSlots[tdevice].CurrentAttachedStatus.ToString();
else if (propName == "outputslotinputbound")
propValue = App.rootHub.OutputslotMan.OutputSlots[tdevice].CurrentInputBound.ToString();
else if (propName == "outputxinputindex")
{
var xboxOutput = (App.rootHub.OutputslotMan.OutputSlots[tdevice].OutputDevice as Xbox360OutDevice);
if(xboxOutput == null)
propValue = (-1).ToString();
else
propValue = xboxOutput.cont.UserIndex.ToString();
}


else if (propName == "apprunning")
propValue = App.rootHub.running.ToString(); // Controller idx value is ignored, but it still needs to be in 1..4 range in a cmdline call
Expand Down