Don't show HDR option if we know it's unsupported

This commit is contained in:
Cameron Gutman
2021-12-12 17:43:20 -06:00
parent daf8495acb
commit c4d85cf928
3 changed files with 20 additions and 4 deletions
+8 -4
View File
@@ -1284,6 +1284,13 @@ Flickable {
AutoResizingComboBox {
// ignore setting the index at first, and actually set it when the component is loaded
Component.onCompleted: {
if (SystemProperties.supportsHdr) {
codecListModel.append({
"text": qsTr("HEVC HDR (Experimental)"),
"val": StreamingPreferences.VCC_FORCE_HEVC_HDR
});
}
var saved_vcc = StreamingPreferences.videoCodecConfig
currentIndex = 0
for(var i = 0; i < codecListModel.count; i++) {
@@ -1312,10 +1319,7 @@ Flickable {
text: qsTr("HEVC (H.265)")
val: StreamingPreferences.VCC_FORCE_HEVC
}
ListElement {
text: qsTr("HEVC HDR (Experimental)")
val: StreamingPreferences.VCC_FORCE_HEVC_HDR
}
/* HEVC HDR will be appended here */
}
// ::onActivated must be used, as it only listens for when the index is changed by a human
onActivated : {