Break out of TouchUnchanged case more quickly

This commit is contained in:
Travis Nickles 2017-12-14 20:54:32 -06:00
parent 71b91bc745
commit e6bab70de2
2 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ namespace DS4Windows
public virtual void touchUnchanged(object sender, EventArgs unused) public virtual void touchUnchanged(object sender, EventArgs unused)
{ {
s = dev.getCurrentStateRef(); s = dev.getCurrentStateRef();
synthesizeMouseButtons(); //synthesizeMouseButtons();
} }
private DS4State remapped = new DS4State(); private DS4State remapped = new DS4State();

View File

@ -67,7 +67,7 @@ namespace DS4Windows
private bool PacketChanged(byte[] data, int touchPacketOffset) private bool PacketChanged(byte[] data, int touchPacketOffset)
{ {
bool changed = false; bool changed = false;
for (int i = 0, arLen = previousPacket.Length; i < arLen; i++) for (int i = 0, arLen = previousPacket.Length; !changed && i < arLen; i++)
{ {
byte oldValue = previousPacket[i]; byte oldValue = previousPacket[i];
previousPacket[i] = data[i + TOUCHPAD_DATA_OFFSET + touchPacketOffset]; previousPacket[i] = data[i + TOUCHPAD_DATA_OFFSET + touchPacketOffset];