diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml index cabea8f6d5..de5e75b7e5 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml @@ -13,6 +13,7 @@ import "../../simplifiedConstants" as SimplifiedConstants import "../../simplifiedControls" as SimplifiedControls import stylesUit 1.0 as HifiStylesUit import QtQuick.Layouts 1.3 +import PerformanceEnums 1.0 Flickable { property string avatarNametagMode: Settings.getValue("simplifiedNametag/avatarNametagMode", "on") @@ -113,16 +114,28 @@ Flickable { SimplifiedControls.RadioButton { id: performanceLow text: "Eco" + checked: Performance.getRefreshRateProfile() === RefreshRate.ECO + onClicked: { + Performance.setRefreshRateProfile(RefreshRate.ECO); + } } SimplifiedControls.RadioButton { id: performanceMedium text: "Interactive" + checked: Performance.getRefreshRateProfile() === RefreshRate.INTERACTIVE + onClicked: { + Performance.setRefreshRateProfile(RefreshRate.INTERACTIVE); + } } SimplifiedControls.RadioButton { id: performanceHigh text: "Realtime" + checked: Performance.getRefreshRateProfile() === RefreshRate.REALTIME + onClicked: { + Performance.setRefreshRateProfile(RefreshRate.REALTIME); + } } } } diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index 6622da33d9..a5a079b4dc 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -277,8 +277,34 @@ Rectangle { } onClicked: { Tablet.playSound(TabletEnums.ButtonClick); - // TODO: actually do this right and change the display plugin - HMD.active = !HMD.active; + var displayPluginCount = Window.getDisplayPluginCount(); + if (HMD.active) { + // This next line seems backwards and shouldn't be necessary - the NOTIFY handler should + // result in `displayModeImage.source` changing automatically - but that's not working. + // This is working. So, I'm keeping it. + displayModeImage.source = "./images/vrMode.svg"; + + // Switch to desktop mode - selects first VR display plugin + for (var i = 0; i < displayPluginCount; i++) { + if (!Window.isDisplayPluginHmd(i)) { + Window.setActiveDisplayPlugin(i); + return; + } + } + } else { + // This next line seems backwards and shouldn't be necessary - the NOTIFY handler should + // result in `displayModeImage.source` changing automatically - but that's not working. + // This is working. So, I'm keeping it. + displayModeImage.source = "./images/desktopMode.svg"; + + // Switch to VR mode - selects first HMD display plugin + for (var i = 0; i < displayPluginCount; i++) { + if (Window.isDisplayPluginHmd(i)) { + Window.setActiveDisplayPlugin(i); + return; + } + } + } } } }