mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
fix(input): discard queued chords on disconnect (#1632)
This commit is contained in:
1 parent
13eb291ba8
commit
b3561bf658
2 files changed
+65
-3
No files matched your search
@@ -692,7 +692,9 @@ public final class PadBridge {
|
||||
slotJoyCons.set(slot * 2 + side, id);
|
||||
slotJoyCons.set(slot * 2 + 1 - side, owner.getId());
|
||||
if (slot == firstPlayerSlot()) releaseBackPaddles();
|
||||
if (slot == 0) clearBackQamWrites();
|
||||
stateFor(slot).clear();
|
||||
if (slot == 0) publish();
|
||||
Log.i(TAG, "\"" + device.getName() + "\" (id " + id + ") joins \"" + owner.getName() + "\" as player " + (slot + 1));
|
||||
return slot;
|
||||
}
|
||||
@@ -727,6 +729,7 @@ public final class PadBridge {
|
||||
}
|
||||
|
||||
private void leave(int slot, int id) {
|
||||
if (slot == 0) clearBackQamWrites();
|
||||
if (partners[slot] == NO_CONTROLLER) {
|
||||
free(slot);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user