mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 09:49:16 +01:00
Version 1.4.0.81
Fix crash when disconnecting by PS+Options
This commit is contained in:
parent
30e1188d74
commit
c8632a96c6
@ -484,8 +484,7 @@ namespace DS4Control
|
|||||||
{
|
{
|
||||||
if (!d.Charging)
|
if (!d.Charging)
|
||||||
{
|
{
|
||||||
d.DisconnectBT();
|
d.DisconnectBT(); InputMethods.performKeyRelease(Global.getCustomKey(0, DS4Controls.PS));
|
||||||
InputMethods.performKeyRelease(Global.getCustomKey(0, DS4Controls.PS));
|
|
||||||
string[] skeys = Global.getCustomMacro(0, DS4Controls.PS).Split('/');
|
string[] skeys = Global.getCustomMacro(0, DS4Controls.PS).Split('/');
|
||||||
ushort[] keys = new ushort[skeys.Length];
|
ushort[] keys = new ushort[skeys.Length];
|
||||||
for (int i = 0; i < keys.Length; i++)
|
for (int i = 0; i < keys.Length; i++)
|
||||||
@ -493,6 +492,7 @@ namespace DS4Control
|
|||||||
keys[i] = ushort.Parse(skeys[i]);
|
keys[i] = ushort.Parse(skeys[i]);
|
||||||
InputMethods.performKeyRelease(keys[i]);
|
InputMethods.performKeyRelease(keys[i]);
|
||||||
}
|
}
|
||||||
|
d = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cState.Touch1 && pState.PS)
|
if (cState.Touch1 && pState.PS)
|
||||||
|
@ -1397,10 +1397,10 @@ namespace DS4Control
|
|||||||
case DS4Controls.Square: return cState.Square;
|
case DS4Controls.Square: return cState.Square;
|
||||||
case DS4Controls.Triangle: return cState.Triangle;
|
case DS4Controls.Triangle: return cState.Triangle;
|
||||||
case DS4Controls.Circle: return cState.Circle;
|
case DS4Controls.Circle: return cState.Circle;
|
||||||
case DS4Controls.TouchLeft: return tp.leftDown;
|
case DS4Controls.TouchLeft: return (tp != null ? tp.leftDown : false);
|
||||||
case DS4Controls.TouchRight: return tp.rightDown;
|
case DS4Controls.TouchRight: return (tp != null ? tp.rightDown : false);
|
||||||
case DS4Controls.TouchMulti: return tp.multiDown;
|
case DS4Controls.TouchMulti: return (tp != null ? tp.multiDown : false);
|
||||||
case DS4Controls.TouchUpper: return tp.upperDown;
|
case DS4Controls.TouchUpper: return (tp != null ? tp.upperDown : false);
|
||||||
case DS4Controls.LXNeg: return cState.LX < 127 - 55;
|
case DS4Controls.LXNeg: return cState.LX < 127 - 55;
|
||||||
case DS4Controls.LYNeg: return cState.LY < 127 - 55;
|
case DS4Controls.LYNeg: return cState.LY < 127 - 55;
|
||||||
case DS4Controls.RXNeg: return cState.RX < 127 - 55;
|
case DS4Controls.RXNeg: return cState.RX < 127 - 55;
|
||||||
|
@ -1376,7 +1376,7 @@ namespace DS4Control
|
|||||||
if (device < 4)
|
if (device < 4)
|
||||||
{
|
{
|
||||||
if (dinputOnly[device] == true) control.x360Bus.Unplug(device);
|
if (dinputOnly[device] == true) control.x360Bus.Unplug(device);
|
||||||
else if (control.DS4Controllers[device].IsAlive()) control.x360Bus.Plugin(device);
|
else if (control.DS4Controllers[device] != null && control.DS4Controllers[device].IsAlive()) control.x360Bus.Plugin(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { missingSetting = true; }
|
catch { missingSetting = true; }
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.4.0.8")]
|
[assembly: AssemblyVersion("1.4.0.81")]
|
||||||
[assembly: AssemblyFileVersion("1.4.0.8")]
|
[assembly: AssemblyFileVersion("1.4.0.81")]
|
||||||
|
Loading…
Reference in New Issue
Block a user