diff --git a/bin/win64/res/qml/SteamVRPage.qml b/bin/win64/res/qml/SteamVRPage.qml index c502295..33fe8e3 100644 --- a/bin/win64/res/qml/SteamVRPage.qml +++ b/bin/win64/res/qml/SteamVRPage.qml @@ -14,7 +14,7 @@ MyStackViewPage { spacing: 16 MyText { - text: "Application Supersampling*:" + text: "Application Supersampling:" Layout.preferredWidth: 350 Layout.rightMargin: 12 } @@ -30,7 +30,7 @@ MyStackViewPage { MySlider { id: steamvrSupersamplingSlider from: 0.1 - to: 2 + to: 5.0 stepSize: 0.1 value: 1.0 snapMode: Slider.SnapAlways @@ -83,8 +83,8 @@ MyStackViewPage { spacing: 16 MyText { - text: "Compositor Supersampling*:" - Layout.preferredWidth: 350 + text: "Compositor Render Target Multiplier*:" + Layout.preferredWidth: 450 Layout.rightMargin: 12 } diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index a7f5ddc..c261ec6 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -20,9 +20,9 @@ void SteamVRTabController::initStage2(OverlayController * parent, QQuickWindow * void SteamVRTabController::eventLoopTick() { if (settingsUpdateCounter >= 50) { vr::EVRSettingsError vrSettingsError; - auto ss = vr::VRSettings()->GetFloat(vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_RenderTargetMultiplier_Float, &vrSettingsError); + auto ss = vr::VRSettings()->GetFloat(vr::k_pch_SteamVR_Section, vrsettings_steamvr_supersampleScale, &vrSettingsError); if (vrSettingsError != vr::VRSettingsError_None) { - LOG(WARNING) << "Could not read \"" << vr::k_pch_SteamVR_RenderTargetMultiplier_Float << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); + LOG(WARNING) << "Could not read \"" << vrsettings_steamvr_supersampleScale << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); if (m_superSampling != 1.0) { LOG(DEBUG) << "OpenVR returns an error and we have a custom supersampling value: " << m_superSampling; setSuperSampling(1.0); @@ -76,7 +76,7 @@ void SteamVRTabController::setSuperSampling(float value, bool notify) { if (override || m_superSampling != value) { LOG(DEBUG) << "Supersampling value changed: " << m_superSampling << " => " << value; m_superSampling = value; - vr::VRSettings()->SetFloat(vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_RenderTargetMultiplier_Float, m_superSampling); + vr::VRSettings()->SetFloat(vr::k_pch_SteamVR_Section, vrsettings_steamvr_supersampleScale, m_superSampling); vr::VRSettings()->Sync(); if (notify) { emit superSamplingChanged(m_superSampling); @@ -167,9 +167,9 @@ void SteamVRTabController::setForceReprojection(bool value, bool notify) { void SteamVRTabController::reset() { vr::EVRSettingsError vrSettingsError; - vr::VRSettings()->RemoveKeyInSection(vr::k_pch_SteamVR_Section, vr::k_pch_SteamVR_RenderTargetMultiplier_Float, &vrSettingsError); + vr::VRSettings()->RemoveKeyInSection(vr::k_pch_SteamVR_Section, vrsettings_steamvr_supersampleScale, &vrSettingsError); if (vrSettingsError != vr::VRSettingsError_None) { - LOG(WARNING) << "Could not remove \"" << vr::k_pch_SteamVR_RenderTargetMultiplier_Float << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); + LOG(WARNING) << "Could not remove \"" << vrsettings_steamvr_supersampleScale << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError); } setCompositorSuperSampling(1.0f); // Is not in default.vrsettings yet diff --git a/src/tabcontrollers/SteamVRTabController.h b/src/tabcontrollers/SteamVRTabController.h index e9aab8d..054b68a 100644 --- a/src/tabcontrollers/SteamVRTabController.h +++ b/src/tabcontrollers/SteamVRTabController.h @@ -7,6 +7,7 @@ //static const char* vrsettings_steamvr_allowAsyncReprojection = "allowAsyncReprojection"; //static const char* vrsettings_steamvr_allowInterleavedReprojection = "allowInterleavedReprojection"; static const char* vrsettings_compositor_category = "compositor"; +static const char* vrsettings_steamvr_supersampleScale = "supersampleScale"; class QQuickWindow;