Fixed Restart SteamVR functionality (May crash the Steam overlay when SteamVR Home is running when you restart. Therefore I advice that you close SteamVR Home before restarting).

Completely disabled sounds to see whether this fixes crashes some people are still experiencing.
Added "Enable Advanced Supersample Filtering" toggle.
This commit is contained in:
2017-05-21 14:24:24 +02:00
parent 5f7fb405ca
commit 0960394335
8 changed files with 58 additions and 13 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class OverlayController : public QObject {
public:
static constexpr const char* applicationKey = "matzman666.AdvancedSettings";
static constexpr const char* applicationName = "Advanced Settings";
static constexpr const char* applicationVersionString = "v2.4";
static constexpr const char* applicationVersionString = "v2.4.1";
private:
vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid;
@@ -59,6 +59,11 @@ void SteamVRTabController::eventLoopTick() {
LOG(WARNING) << "Could not read \"" << vr::k_pch_SteamVR_ForceReprojection_Bool << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError);
}
setForceReprojection(fr);
auto sf = vr::VRSettings()->GetBool(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, &vrSettingsError);
if (vrSettingsError != vr::VRSettingsError_None) {
LOG(WARNING) << "Could not read \"" << vrsettings_steamvr_allowSupersampleFiltering << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError);
}
setAllowSupersampleFiltering(sf);
settingsUpdateCounter = 0;
} else {
settingsUpdateCounter++;
@@ -164,6 +169,25 @@ void SteamVRTabController::setForceReprojection(bool value, bool notify) {
}
bool SteamVRTabController::allowSupersampleFiltering() const {
return m_allowSupersampleFiltering;
}
void SteamVRTabController::setAllowSupersampleFiltering(bool value, bool notify) {
if (m_allowSupersampleFiltering != value) {
m_allowSupersampleFiltering = value;
vr::VRSettings()->SetBool(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, m_allowSupersampleFiltering);
vr::VRSettings()->Sync();
if (notify) {
emit allowSupersampleFilteringChanged(m_allowSupersampleFiltering);
}
}
}
void SteamVRTabController::reset() {
vr::EVRSettingsError vrSettingsError;
@@ -193,6 +217,11 @@ void SteamVRTabController::reset() {
LOG(WARNING) << "Could not remove \"" << vr::k_pch_SteamVR_ForceReprojection_Bool << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError);
}
vr::VRSettings()->RemoveKeyInSection(vr::k_pch_SteamVR_Section, vrsettings_steamvr_allowSupersampleFiltering, &vrSettingsError);
if (vrSettingsError != vr::VRSettingsError_None) {
LOG(WARNING) << "Could not remove \"" << vrsettings_steamvr_allowSupersampleFiltering << "\" setting: " << vr::VRSettings()->GetSettingsErrorNameFromEnum(vrSettingsError);
}
vr::VRSettings()->Sync();
settingsUpdateCounter = 999; // Easiest way to get default values
}
@@ -8,6 +8,7 @@
//static const char* vrsettings_steamvr_allowInterleavedReprojection = "allowInterleavedReprojection";
static const char* vrsettings_compositor_category = "compositor";
static const char* vrsettings_steamvr_supersampleScale = "supersampleScale";
static const char* vrsettings_steamvr_allowSupersampleFiltering = "allowSupersampleFiltering";
class QQuickWindow;
@@ -25,6 +26,7 @@ class SteamVRTabController : public QObject {
Q_PROPERTY(bool allowInterleavedReprojection READ allowInterleavedReprojection WRITE setAllowInterleavedReprojection NOTIFY allowInterleavedReprojectionChanged)
Q_PROPERTY(bool allowAsyncReprojection READ allowAsyncReprojection WRITE setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged)
Q_PROPERTY(bool forceReprojection READ forceReprojection WRITE setForceReprojection NOTIFY forceReprojectionChanged)
Q_PROPERTY(bool allowSupersampleFiltering READ allowSupersampleFiltering WRITE setAllowSupersampleFiltering NOTIFY allowSupersampleFilteringChanged)
private:
OverlayController* parent;
@@ -35,6 +37,7 @@ private:
bool m_allowInterleavedReprojection = true;
bool m_allowAsyncReprojection = true;
bool m_forceReprojection = false;
bool m_allowSupersampleFiltering = true;
unsigned settingsUpdateCounter = 0;
@@ -49,6 +52,7 @@ public:
bool allowInterleavedReprojection() const;
bool allowAsyncReprojection() const;
bool forceReprojection() const;
bool allowSupersampleFiltering() const;
public slots:
void setSuperSampling(float value, bool notify = true);
@@ -56,6 +60,7 @@ public slots:
void setAllowInterleavedReprojection(bool value, bool notify = true);
void setAllowAsyncReprojection(bool value, bool notify = true);
void setForceReprojection(bool value, bool notify = true);
void setAllowSupersampleFiltering(bool value, bool notify = true);
void reset();
void restartSteamVR();
@@ -66,6 +71,7 @@ signals:
void allowInterleavedReprojectionChanged(bool value);
void allowAsyncReprojectionChanged(bool value);
void forceReprojectionChanged(bool value);
void allowSupersampleFilteringChanged(bool value);
};
} // namespace advsettings