mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Disable the decoder selection options when HDR is enabled
This commit is contained in:
@@ -1288,6 +1288,7 @@ Flickable {
|
|||||||
|
|
||||||
id: decoderComboBox
|
id: decoderComboBox
|
||||||
textRole: "text"
|
textRole: "text"
|
||||||
|
enabled: !enableHdr.checked
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
id: decoderListModel
|
id: decoderListModel
|
||||||
ListElement {
|
ListElement {
|
||||||
@@ -1304,9 +1305,26 @@ Flickable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
||||||
onActivated : {
|
onActivated: {
|
||||||
StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val
|
if (enabled) {
|
||||||
|
StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This handles the state of the enableHdr checkbox changing
|
||||||
|
onEnabledChanged: {
|
||||||
|
if (enabled) {
|
||||||
|
StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StreamingPreferences.videoDecoderSelection = StreamingPreferences.VDS_AUTO
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTip.delay: 1000
|
||||||
|
ToolTip.timeout: 5000
|
||||||
|
ToolTip.visible: hovered && !enabled
|
||||||
|
ToolTip.text: qsTr("Enabling HDR overrides manual decoder selections.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
Reference in New Issue
Block a user