mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 02:04:26 +02:00
Merge pull request #15657 from zfox23/newPerformanceAPI
BUGZ-447: Use new performance preset API
This commit is contained in:
commit
52d02f61a1
2 changed files with 11 additions and 11 deletions
|
@ -101,7 +101,7 @@ Flickable {
|
||||||
|
|
||||||
HifiStylesUit.GraphikRegular {
|
HifiStylesUit.GraphikRegular {
|
||||||
id: performanceTitle
|
id: performanceTitle
|
||||||
text: "Performance"
|
text: "Graphics Preset"
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
height: paintedHeight
|
height: paintedHeight
|
||||||
size: 22
|
size: 22
|
||||||
|
@ -115,28 +115,28 @@ Flickable {
|
||||||
|
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceLow
|
id: performanceLow
|
||||||
text: "Eco"
|
text: "Low"
|
||||||
checked: Performance.getRefreshRateProfile() === RefreshRate.ECO
|
checked: Performance.getPerformancePreset() === PerformanceEnums.LOW
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Performance.setRefreshRateProfile(RefreshRate.ECO);
|
Performance.setPerformancePreset(PerformanceEnums.LOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceMedium
|
id: performanceMedium
|
||||||
text: "Interactive"
|
text: "Medium"
|
||||||
checked: Performance.getRefreshRateProfile() === RefreshRate.INTERACTIVE
|
checked: Performance.getPerformancePreset() === PerformanceEnums.MID
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Performance.setRefreshRateProfile(RefreshRate.INTERACTIVE);
|
Performance.setPerformancePreset(PerformanceEnums.MID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: performanceHigh
|
id: performanceHigh
|
||||||
text: "Realtime"
|
text: "High"
|
||||||
checked: Performance.getRefreshRateProfile() === RefreshRate.REALTIME
|
checked: Performance.getPerformancePreset() === PerformanceEnums.HIGH
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Performance.setRefreshRateProfile(RefreshRate.REALTIME);
|
Performance.setPerformancePreset(PerformanceEnums.HIGH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ std::once_flag PerformanceScriptingInterface::registry_flag;
|
||||||
|
|
||||||
PerformanceScriptingInterface::PerformanceScriptingInterface() {
|
PerformanceScriptingInterface::PerformanceScriptingInterface() {
|
||||||
std::call_once(registry_flag, [] {
|
std::call_once(registry_flag, [] {
|
||||||
qmlRegisterType<PerformanceScriptingInterface>("PerformanceEnums", 1, 0, "RefreshRate");
|
qmlRegisterType<PerformanceScriptingInterface>("PerformanceEnums", 1, 0, "PerformanceEnums");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue