public float GetBrightness() { var error = EVRSettingsError.None; var gain = vrSettings.GetFloat("steamvr", "analogGain", ref error); if (error != EVRSettingsError.None) { var message = vrSettings.GetSettingsErrorNameFromEnum(error); throw new Exception($"Failed to get display brightness: {message}"); } return((float)Math.Pow(gain, 1 / 2.2)); }
// Token: 0x06005ED9 RID: 24281 RVA: 0x00213320 File Offset: 0x00211720 private void OnEnable() { this.usingSpeakers = false; CVRSettings settings = OpenVR.Settings; if (settings != null) { EVRSettingsError evrsettingsError = EVRSettingsError.None; if (settings.GetBool("steamvr", "usingSpeakers", ref evrsettingsError)) { this.usingSpeakers = true; float @float = settings.GetFloat("steamvr", "speakersForwardYawOffsetDegrees", ref evrsettingsError); this.offset = Quaternion.Euler(0f, @float, 0f); } } if (this.usingSpeakers) { SteamVR_Events.NewPosesApplied.Listen(new UnityAction(this.OnNewPosesApplied)); } }
private void OnEnable() { this.usingSpeakers = false; CVRSettings settings = OpenVR.Settings; if (settings != null) { EVRSettingsError eVRSettingsError = EVRSettingsError.None; if (settings.GetBool("steamvr", "usingSpeakers", false, ref eVRSettingsError)) { this.usingSpeakers = true; float @float = settings.GetFloat("steamvr", "speakersForwardYawOffsetDegrees", 0f, ref eVRSettingsError); this.offset = Quaternion.Euler(0f, @float, 0f); } } if (this.usingSpeakers) { SteamVR_Utils.Event.Listen("new_poses_applied", new SteamVR_Utils.Event.Handler(this.OnNewPosesApplied)); } }