mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
Make vrc config save mute settings to config
This commit is contained in:
1 parent
8168e1366a
commit
fa1d2012e1
6 files changed
+40
-13
No files matched your search
@@ -21,6 +21,7 @@ fun main(args: Array<String>) = runBlocking {
|
||||
val serialServer = createDesktopSerialServer(this)
|
||||
val firmwareManager = createFirmwareManager(serialServer = serialServer, scope = this)
|
||||
val vrcConfigManager = createDesktopVRCConfigManager(
|
||||
config = config,
|
||||
scope = this,
|
||||
userHeight = { config.userConfig.context.state.value.data.userHeight.toDouble() },
|
||||
)
|
||||
|
||||
@@ -96,7 +96,6 @@ internal fun linuxVRCConfigFlow(): Flow<solarxr_protocol.rpc.VRCConfigValues?> =
|
||||
intValue = { key -> keys[key]?.let { linuxGetDwordValue(registry, it) } },
|
||||
doubleValue = { key -> keys[key]?.let { linuxGetQwordValue(registry, it) } },
|
||||
))
|
||||
println("EMIT")
|
||||
}
|
||||
delay(3000)
|
||||
// it seems that on linux, steam writes to the reg file is unpredictable.
|
||||
|
||||
@@ -2,6 +2,7 @@ package dev.slimevr.desktop.vrchat
|
||||
|
||||
import dev.slimevr.CURRENT_PLATFORM
|
||||
import dev.slimevr.Platform
|
||||
import dev.slimevr.config.AppConfig
|
||||
import dev.slimevr.vrchat.VRCConfigManager
|
||||
import dev.slimevr.vrchat.createVRCConfigManager
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@@ -13,21 +14,24 @@ import solarxr_protocol.rpc.VRCTrackerModel
|
||||
|
||||
internal const val VRC_REG_PATH = "Software\\VRChat\\VRChat"
|
||||
|
||||
fun createDesktopVRCConfigManager(scope: CoroutineScope, userHeight: () -> Double): VRCConfigManager =
|
||||
fun createDesktopVRCConfigManager(config: AppConfig, scope: CoroutineScope, userHeight: () -> Double): VRCConfigManager =
|
||||
when (CURRENT_PLATFORM) {
|
||||
Platform.WINDOWS -> createVRCConfigManager(
|
||||
config = config,
|
||||
scope = scope,
|
||||
userHeight = userHeight,
|
||||
isSupported = true,
|
||||
values = windowsVRCConfigFlow(),
|
||||
)
|
||||
Platform.LINUX -> createVRCConfigManager(
|
||||
config = config,
|
||||
scope = scope,
|
||||
userHeight = userHeight,
|
||||
isSupported = true,
|
||||
values = linuxVRCConfigFlow(),
|
||||
)
|
||||
else -> createVRCConfigManager(
|
||||
config = config,
|
||||
scope = scope,
|
||||
userHeight = userHeight,
|
||||
isSupported = false,
|
||||
@@ -63,4 +67,4 @@ internal suspend fun buildVRCConfigValues(
|
||||
1 -> VRCAvatarMeasurementType.HEIGHT
|
||||
else -> VRCAvatarMeasurementType.UNKNOWN
|
||||
},
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user