mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 17:11:20 -08:00
Update SolarXR
This commit is contained in:
3 files changed
+4
-6
No files matched your search
@@ -37,7 +37,7 @@ class DriverHandshakeBehaviour(
|
||||
}.launchIn(receiver.context.scope)
|
||||
|
||||
receiver.onDriverMessage<HandshakeRequest> { req, replyTo ->
|
||||
val name = req.driverName?.takeIf { it.isNotEmpty() } ?: run {
|
||||
val name = req.driverName.takeIf { it.isNotEmpty() } ?: run {
|
||||
AppLogger.solarxr.info("Rejecting driver handshake because it's unnamed")
|
||||
receiver.sendDriverMessage(HandshakeResponse(status = HandshakeStatus.REJECTED_UNNAMED), replyTo = replyTo)
|
||||
return@onDriverMessage
|
||||
|
||||
@@ -25,13 +25,11 @@ class DriverIncomingTrackersBehaviour(
|
||||
val server = appContext.server
|
||||
|
||||
receiver.onDriverMessage<AddTrackerRequest> { req, replyTo ->
|
||||
val driverName = receiver.context.state.value.driverName
|
||||
val hardwareId = req.hardwareIdentifier
|
||||
|
||||
if (hardwareId == null || driverName == null) {
|
||||
val driverName = receiver.context.state.value.driverName ?: run {
|
||||
receiver.sendDriverMessage(AddTrackerResponse(status = AddTrackerStatus.ERROR), replyTo = replyTo)
|
||||
return@onDriverMessage
|
||||
}
|
||||
val hardwareId = req.hardwareIdentifier
|
||||
|
||||
val existing = server.context.state.value.trackers.values
|
||||
.find { it.context.state.value.hardwareId == hardwareId }
|
||||
|
||||
+1
-1
Submodule solarxr-protocol updated: 3286c19074...719bf90df6.
Reference in new issue
Block a user