mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 09:19:18 +01:00
Added device type strings to output devices
This commit is contained in:
parent
ab8dbd29f9
commit
8a6c05bce7
@ -1094,10 +1094,11 @@ namespace DS4Windows
|
||||
{
|
||||
if (!useDInputOnly[ind])
|
||||
{
|
||||
string tempType = outputDevices[ind].GetDeviceType();
|
||||
outputDevices[ind].Disconnect();
|
||||
outputDevices[ind] = null;
|
||||
useDInputOnly[ind] = true;
|
||||
LogDebug("Controller #" + (ind + 1) + " unplugged");
|
||||
LogDebug(tempType + " Controller #" + (ind + 1) + " unplugged");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1167,11 +1168,12 @@ namespace DS4Windows
|
||||
CurrentState[ind].Battery = PreviousState[ind].Battery = 0; // Reset for the next connection's initial status change.
|
||||
if (!useDInputOnly[ind])
|
||||
{
|
||||
string tempType = outputDevices[ind].GetDeviceType();
|
||||
outputDevices[ind].Disconnect();
|
||||
outputDevices[ind] = null;
|
||||
//x360controls[ind].Disconnect();
|
||||
//x360controls[ind] = null;
|
||||
LogDebug("X360 Controller # " + (ind + 1) + " unplugged");
|
||||
LogDebug(tempType + " Controller # " + (ind + 1) + " unplugged");
|
||||
}
|
||||
|
||||
// Use Task to reset device synth state and commit it
|
||||
|
@ -11,6 +11,8 @@ namespace DS4Windows
|
||||
{
|
||||
class DS4OutDevice : OutputDevice
|
||||
{
|
||||
public const string devtype = "DS4";
|
||||
|
||||
public DualShock4Controller cont;
|
||||
private DualShock4Report report;
|
||||
|
||||
@ -79,5 +81,6 @@ namespace DS4Windows
|
||||
|
||||
public override void Connect() => cont.Connect();
|
||||
public override void Disconnect() => cont.Disconnect();
|
||||
public override string GetDeviceType() => devtype;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DS4Windows
|
||||
{
|
||||
@ -11,5 +7,6 @@ namespace DS4Windows
|
||||
public abstract void ConvertandSendReport(DS4State state, int device);
|
||||
public abstract void Connect();
|
||||
public abstract void Disconnect();
|
||||
public abstract string GetDeviceType();
|
||||
}
|
||||
}
|
||||
|
@ -3214,10 +3214,11 @@ namespace DS4Windows
|
||||
}
|
||||
else if (xinputStatus && !xinputPlug)
|
||||
{
|
||||
string tempType = control.outputDevices[device].GetDeviceType();
|
||||
control.outputDevices[device].Disconnect();
|
||||
control.outputDevices[device] = null;
|
||||
Global.useDInputOnly[device] = true;
|
||||
AppLogger.LogToGui("Controller #" + (device + 1) + " unplugged", false);
|
||||
AppLogger.LogToGui(tempType + " Controller #" + (device + 1) + " unplugged", false);
|
||||
}
|
||||
|
||||
tempDev.setRumble(0, 0);
|
||||
|
@ -14,6 +14,7 @@ namespace DS4Windows
|
||||
private const int inputResolution = 127 - (-128);
|
||||
private const float reciprocalInputResolution = 1 / (float)inputResolution;
|
||||
private const int outputResolution = 32767 - (-32768);
|
||||
public const string devType = "X360";
|
||||
|
||||
public Xbox360Controller cont;
|
||||
private Xbox360Report report;
|
||||
@ -137,5 +138,6 @@ namespace DS4Windows
|
||||
|
||||
public override void Connect() => cont.Connect();
|
||||
public override void Disconnect() => cont.Disconnect();
|
||||
public override string GetDeviceType() => devType;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user