From 916ff31cf6bbe79ba39937a02ad4bf9d884e0449 Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Thu, 30 May 2019 17:51:21 -0700 Subject: [PATCH] adjust the preset options --- interface/src/PerformanceManager.cpp | 2 ++ interface/src/PerformanceManager.h | 3 ++- interface/src/scripting/PerformanceScriptingInterface.cpp | 2 +- interface/src/scripting/PerformanceScriptingInterface.h | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/src/PerformanceManager.cpp b/interface/src/PerformanceManager.cpp index 9e96763ff6..fc601fdf8a 100644 --- a/interface/src/PerformanceManager.cpp +++ b/interface/src/PerformanceManager.cpp @@ -57,7 +57,9 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::ECO); break; + case PerformancePreset::UNKNOWN: default: + // Do nothing anymore break; } } diff --git a/interface/src/PerformanceManager.h b/interface/src/PerformanceManager.h index 14742626c3..adbc5804b1 100644 --- a/interface/src/PerformanceManager.h +++ b/interface/src/PerformanceManager.h @@ -20,7 +20,8 @@ class PerformanceManager { public: enum PerformancePreset { - LOW = 0, + UNKNOWN = 0, // Matching the platform Tier profiles enumeration for coherence + LOW, MID, HIGH, PROFILE_COUNT diff --git a/interface/src/scripting/PerformanceScriptingInterface.cpp b/interface/src/scripting/PerformanceScriptingInterface.cpp index 4f7c2b0fda..a571e305d9 100644 --- a/interface/src/scripting/PerformanceScriptingInterface.cpp +++ b/interface/src/scripting/PerformanceScriptingInterface.cpp @@ -28,7 +28,7 @@ PerformanceScriptingInterface::PerformancePreset PerformanceScriptingInterface:: } QStringList PerformanceScriptingInterface::getPerformancePresetNames() const { - static const QStringList performancePresetNames = { "Low", "Mid", "High" }; + static const QStringList performancePresetNames = { "Unknown", "Low", "Mid", "High" }; return performancePresetNames; } diff --git a/interface/src/scripting/PerformanceScriptingInterface.h b/interface/src/scripting/PerformanceScriptingInterface.h index 3dbcd620fa..c416b23b56 100644 --- a/interface/src/scripting/PerformanceScriptingInterface.h +++ b/interface/src/scripting/PerformanceScriptingInterface.h @@ -27,6 +27,7 @@ public: LOW = PerformanceManager::PerformancePreset::LOW, MID = PerformanceManager::PerformancePreset::MID, HIGH = PerformanceManager::PerformancePreset::HIGH, + UNKNOWN = PerformanceManager::PerformancePreset::UNKNOWN, }; Q_ENUM(PerformancePreset)