mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Preserve replacement session Deck input routing
This commit is contained in:
1 parent
63004567fd
commit
7b7722bd25
4 files changed
+48
-1
No files matched your search
@@ -5115,7 +5115,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
padBridge?.setInputEnabled(false)
|
||||
physicalInputBindings?.close()
|
||||
padBridge?.stop()
|
||||
DeckControls.setRouter(null)
|
||||
DeckControls.clearRouter(inputRouter)
|
||||
inputRouter = null
|
||||
heldKeys.clear()
|
||||
heldButtons.clear()
|
||||
|
||||
@@ -23,6 +23,11 @@ object DeckControls {
|
||||
publish()
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun clearRouter(owner: InputRouter?) {
|
||||
if (owner != null && router === owner) setRouter(null)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
@JvmOverloads
|
||||
fun source(role: InputRole, routed: Boolean = false) = Source(role, routed)
|
||||
|
||||
Reference in new issue
Block a user