mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Fit VR games on the glasses: full view, seated origin at the head, pad hands reach with the d-pad
This commit is contained in:
1 parent
a746d56dc8
commit
7c8fa679bd
6 files changed
+51
-8
No files matched your search
@@ -136,7 +136,10 @@ class AgentBridgeProvider : ContentProvider() {
|
||||
else -> return error("INVALID_KEY", "Unknown glasses setting '$key'")
|
||||
}
|
||||
}
|
||||
"simulate" -> if (!g.simulate(request.optInt("seconds", 20).coerceIn(1, 600))) return error("BUSY", "Already simulating")
|
||||
"simulate" -> {
|
||||
fun angle(key: String) = if (request.has(key)) request.optDouble(key).takeIf { it.isFinite() }?.coerceIn(-90.0, 90.0) else null
|
||||
if (!g.simulate(request.optInt("seconds", 20).coerceIn(1, 600), angle("yaw"), angle("pitch"))) return error("BUSY", "Already simulating")
|
||||
}
|
||||
"stop-simulate" -> g.stopSimulation()
|
||||
"query" -> { g.query(); Thread.sleep(600) }
|
||||
"mode" -> { g.sendMode(request.optString("mode").removePrefix("0x").toInt(16)); Thread.sleep(600) }
|
||||
|
||||
Reference in new issue
Block a user