2018-07-08 05:15:02 +00:00
|
|
|
import QtQuick 2.9
|
2018-07-08 17:19:08 +00:00
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
2018-07-09 05:56:38 +00:00
|
|
|
import StreamingPreferences 1.0
|
|
|
|
|
2018-07-08 18:20:56 +00:00
|
|
|
ScrollView {
|
2018-07-08 05:15:02 +00:00
|
|
|
id: settingsPage
|
|
|
|
objectName: "Settings"
|
|
|
|
|
2018-07-09 05:56:38 +00:00
|
|
|
StreamingPreferences {
|
|
|
|
id: prefs
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onDestruction: {
|
|
|
|
prefs.save()
|
|
|
|
}
|
|
|
|
|
2018-07-08 17:19:08 +00:00
|
|
|
Column {
|
2018-07-20 22:47:50 +00:00
|
|
|
padding: 10
|
|
|
|
id: settingsColumn1
|
|
|
|
width: settingsPage.width / 2 - padding
|
2018-07-08 17:19:08 +00:00
|
|
|
|
|
|
|
GroupBox {
|
2018-07-08 18:12:22 +00:00
|
|
|
id: basicSettingsGroupBox
|
2018-07-20 22:47:50 +00:00
|
|
|
width: (parent.width - 2 * parent.padding)
|
2018-07-08 17:19:08 +00:00
|
|
|
padding: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
title: "<font color=\"skyblue\">Basic Settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
2018-07-08 17:19:08 +00:00
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: resFPStitle
|
2018-07-28 08:22:31 +00:00
|
|
|
text: qsTr("Resolution and FPS")
|
2018-07-08 17:19:08 +00:00
|
|
|
font.pointSize: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: "white"
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: resFPSdesc
|
2018-08-05 21:55:26 +00:00
|
|
|
text: qsTr("Setting values too high for your PC may cause lag, stuttering, or errors.")
|
2018-07-08 17:19:08 +00:00
|
|
|
font.pointSize: 9
|
|
|
|
wrapMode: Text.Wrap
|
2018-07-08 18:20:56 +00:00
|
|
|
color: "white"
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
|
2018-07-28 08:22:31 +00:00
|
|
|
Row {
|
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
2018-08-05 21:55:26 +00:00
|
|
|
// Add native resolutions for all attached displays
|
2018-09-04 04:21:37 +00:00
|
|
|
var done = false
|
|
|
|
for (var displayIndex = 0; !done; displayIndex++) {
|
|
|
|
for (var displayResIndex = 0; displayResIndex < 2; displayResIndex++) {
|
|
|
|
var screenRect;
|
2018-08-05 21:55:26 +00:00
|
|
|
|
2018-09-04 04:21:37 +00:00
|
|
|
// Some platforms have different desktop resolutions
|
|
|
|
// and native resolutions (like macOS with Retina displays)
|
|
|
|
if (displayResIndex == 0) {
|
|
|
|
screenRect = prefs.getDesktopResolution(displayIndex)
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
screenRect = prefs.getNativeResolution(displayIndex)
|
|
|
|
}
|
2018-08-05 21:55:26 +00:00
|
|
|
|
2018-09-04 04:21:37 +00:00
|
|
|
if (screenRect.width === 0) {
|
|
|
|
// Exceeded max count of displays
|
|
|
|
done = true
|
2018-08-05 21:55:26 +00:00
|
|
|
break
|
|
|
|
}
|
2018-09-04 04:21:37 +00:00
|
|
|
|
|
|
|
var indexToAdd = 0
|
|
|
|
for (var j = 0; j < resolutionComboBox.count; j++) {
|
|
|
|
var existing_width = parseInt(resolutionListModel.get(j).video_width);
|
|
|
|
var existing_height = parseInt(resolutionListModel.get(j).video_height);
|
|
|
|
|
|
|
|
if (screenRect.width === existing_width && screenRect.height === existing_height) {
|
|
|
|
// Duplicate entry, skip
|
|
|
|
indexToAdd = -1
|
|
|
|
break
|
|
|
|
}
|
|
|
|
else if (screenRect.width * screenRect.height > existing_width * existing_height) {
|
|
|
|
// Candidate entrypoint after this entry
|
|
|
|
indexToAdd = j + 1
|
|
|
|
}
|
2018-08-05 21:55:26 +00:00
|
|
|
}
|
|
|
|
|
2018-09-04 04:21:37 +00:00
|
|
|
// Insert this display's resolution if it's not a duplicate
|
|
|
|
if (indexToAdd >= 0) {
|
|
|
|
resolutionListModel.insert(indexToAdd,
|
|
|
|
{
|
|
|
|
"text": "Native ("+screenRect.width+"x"+screenRect.height+")",
|
|
|
|
"video_width": ""+screenRect.width,
|
|
|
|
"video_height": ""+screenRect.height
|
|
|
|
})
|
|
|
|
}
|
2018-08-05 21:55:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-28 08:22:31 +00:00
|
|
|
// load the saved width/height, and iterate through the ComboBox until a match is found
|
|
|
|
// and set it to that index.
|
|
|
|
var saved_width = prefs.width
|
|
|
|
var saved_height = prefs.height
|
|
|
|
currentIndex = 0
|
|
|
|
for (var i = 0; i < resolutionComboBox.count; i++) {
|
|
|
|
var el_width = parseInt(resolutionListModel.get(i).video_width);
|
|
|
|
var el_height = parseInt(resolutionListModel.get(i).video_height);
|
2018-08-05 21:55:26 +00:00
|
|
|
|
|
|
|
// Pick the highest value lesser or equal to the saved resolution
|
|
|
|
if (saved_width * saved_height >= el_width * el_height) {
|
2018-07-28 08:22:31 +00:00
|
|
|
currentIndex = i
|
|
|
|
}
|
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
|
|
|
|
// Persist the selected value
|
|
|
|
activated(currentIndex)
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
|
|
|
|
2018-07-28 08:22:31 +00:00
|
|
|
id: resolutionComboBox
|
2018-08-05 21:55:26 +00:00
|
|
|
width: 200
|
2018-07-28 08:22:31 +00:00
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: resolutionListModel
|
2018-08-05 21:55:26 +00:00
|
|
|
// Other elements may be added at runtime
|
|
|
|
// based on attached display resolution
|
2018-07-28 08:22:31 +00:00
|
|
|
ListElement {
|
|
|
|
text: "720p"
|
|
|
|
video_width: "1280"
|
|
|
|
video_height: "720"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "1080p"
|
|
|
|
video_width: "1920"
|
|
|
|
video_height: "1080"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "1440p"
|
|
|
|
video_width: "2560"
|
|
|
|
video_height: "1440"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "4K"
|
|
|
|
video_width: "3840"
|
|
|
|
video_height: "2160"
|
|
|
|
}
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
2018-07-28 08:22:31 +00:00
|
|
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
|
|
|
onActivated : {
|
2018-09-08 06:16:13 +00:00
|
|
|
var selectedWidth = parseInt(resolutionListModel.get(currentIndex).video_width)
|
|
|
|
var selectedHeight = parseInt(resolutionListModel.get(currentIndex).video_height)
|
|
|
|
|
|
|
|
// Only modify the bitrate if the values actually changed
|
|
|
|
if (prefs.width !== selectedWidth || prefs.height !== selectedHeight) {
|
|
|
|
prefs.width = selectedWidth
|
|
|
|
prefs.height = selectedHeight
|
2018-07-28 08:22:31 +00:00
|
|
|
|
2018-09-08 06:16:13 +00:00
|
|
|
prefs.bitrateKbps = prefs.getDefaultBitrate(prefs.width, prefs.height, prefs.fps);
|
|
|
|
slider.value = prefs.bitrateKbps
|
|
|
|
}
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
2018-07-28 08:22:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
|
|
|
// Get the max supported FPS on this system
|
|
|
|
var max_fps = prefs.getMaximumStreamingFrameRate();
|
|
|
|
|
|
|
|
// Use 64 as the cutoff for adding a separate option to
|
|
|
|
// handle wonky displays that report just over 60 Hz.
|
|
|
|
if (max_fps > 64) {
|
|
|
|
fpsListModel.append({"text": max_fps+" FPS", "video_fps": ""+max_fps})
|
|
|
|
}
|
|
|
|
|
|
|
|
var saved_fps = prefs.fps
|
|
|
|
currentIndex = 0
|
|
|
|
for (var i = 0; i < fpsComboBox.count; i++) {
|
|
|
|
var el_fps = parseInt(fpsListModel.get(i).video_fps);
|
2018-08-05 21:55:26 +00:00
|
|
|
|
|
|
|
// Pick the highest value lesser or equal to the saved FPS
|
2018-08-05 22:09:36 +00:00
|
|
|
if (saved_fps >= el_fps) {
|
2018-07-28 08:22:31 +00:00
|
|
|
currentIndex = i
|
|
|
|
}
|
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
|
|
|
|
// Persist the selected value
|
|
|
|
activated(currentIndex)
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
2018-07-28 08:22:31 +00:00
|
|
|
|
|
|
|
id: fpsComboBox
|
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: fpsListModel
|
|
|
|
ListElement {
|
|
|
|
text: "30 FPS"
|
|
|
|
video_fps: "30"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "60 FPS"
|
|
|
|
video_fps: "60"
|
|
|
|
}
|
|
|
|
// A higher value may be added at runtime
|
|
|
|
// based on the attached display refresh rate
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
2018-07-28 08:22:31 +00:00
|
|
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
|
|
|
onActivated : {
|
2018-09-08 06:16:13 +00:00
|
|
|
var selectedFps = parseInt(fpsListModel.get(currentIndex).video_fps)
|
|
|
|
|
|
|
|
// Only modify the bitrate if the values actually changed
|
|
|
|
if (prefs.fps !== selectedFps) {
|
|
|
|
prefs.fps = selectedFps
|
2018-07-28 08:22:31 +00:00
|
|
|
|
2018-09-08 06:16:13 +00:00
|
|
|
prefs.bitrateKbps = prefs.getDefaultBitrate(prefs.width, prefs.height, prefs.fps);
|
|
|
|
slider.value = prefs.bitrateKbps
|
|
|
|
}
|
2018-07-16 01:27:41 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: bitrateTitle
|
2018-07-09 05:56:38 +00:00
|
|
|
text: qsTr("Video bitrate: ")
|
2018-07-08 17:19:08 +00:00
|
|
|
font.pointSize: 12
|
|
|
|
wrapMode: Text.Wrap
|
2018-07-08 18:20:56 +00:00
|
|
|
color: "white"
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: bitrateDesc
|
2018-07-09 05:56:38 +00:00
|
|
|
text: qsTr("Lower bitrate to reduce lag and stuttering. Raise bitrate to increase image quality.")
|
2018-07-08 17:19:08 +00:00
|
|
|
font.pointSize: 9
|
|
|
|
wrapMode: Text.Wrap
|
2018-07-08 18:20:56 +00:00
|
|
|
color: "white"
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: slider
|
|
|
|
wheelEnabled: true
|
|
|
|
|
2018-07-09 05:56:38 +00:00
|
|
|
value: prefs.bitrateKbps
|
2018-07-18 01:52:06 +00:00
|
|
|
|
2018-07-08 17:19:08 +00:00
|
|
|
stepSize: 500
|
|
|
|
from : 500
|
2018-07-28 08:22:31 +00:00
|
|
|
to: 150000
|
2018-07-18 01:52:06 +00:00
|
|
|
|
2018-07-08 17:19:08 +00:00
|
|
|
snapMode: "SnapOnRelease"
|
|
|
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
|
|
|
|
2018-07-09 05:56:38 +00:00
|
|
|
onValueChanged: {
|
|
|
|
bitrateTitle.text = "Video bitrate: " + (value / 1000.0) + " Mbps"
|
|
|
|
prefs.bitrateKbps = value
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
|
2018-09-04 02:17:34 +00:00
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: windowModeTitle
|
|
|
|
text: qsTr("Display mode")
|
|
|
|
font.pointSize: 12
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: "white"
|
|
|
|
}
|
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
|
|
|
var savedWm = prefs.windowMode
|
|
|
|
currentIndex = 0
|
|
|
|
for (var i = 0; i < windowModeListModel.count; i++) {
|
|
|
|
var thisWm = windowModeListModel.get(i).val;
|
|
|
|
if (savedWm === thisWm) {
|
|
|
|
currentIndex = i
|
2018-09-08 06:16:13 +00:00
|
|
|
break
|
2018-09-04 02:17:34 +00:00
|
|
|
}
|
2018-08-21 05:25:19 +00:00
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
activated(currentIndex)
|
2018-08-21 05:25:19 +00:00
|
|
|
}
|
|
|
|
|
2018-09-04 02:17:34 +00:00
|
|
|
id: windowModeComboBox
|
|
|
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: windowModeListModel
|
|
|
|
ListElement {
|
2018-09-06 00:46:29 +00:00
|
|
|
text: "Full-screen (Recommended)"
|
2018-09-04 02:17:34 +00:00
|
|
|
val: StreamingPreferences.WM_FULLSCREEN
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "Borderless windowed"
|
|
|
|
val: StreamingPreferences.WM_FULLSCREEN_DESKTOP
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "Windowed"
|
|
|
|
val: StreamingPreferences.WM_WINDOWED
|
2018-08-21 05:25:19 +00:00
|
|
|
}
|
2018-07-09 05:56:38 +00:00
|
|
|
}
|
2018-09-04 02:17:34 +00:00
|
|
|
onActivated: {
|
|
|
|
prefs.windowMode = windowModeListModel.get(currentIndex).val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: vsyncCheck
|
|
|
|
text: "<font color=\"white\">Enable V-Sync</font>"
|
|
|
|
font.pointSize: 12
|
|
|
|
visible: prefs.windowMode === StreamingPreferences.WM_FULLSCREEN
|
|
|
|
checked: prefs.enableVsync
|
|
|
|
onCheckedChanged: {
|
|
|
|
prefs.enableVsync = checked
|
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GroupBox {
|
2018-07-18 02:39:16 +00:00
|
|
|
|
2018-07-08 18:12:22 +00:00
|
|
|
id: audioSettingsGroupBox
|
2018-07-20 22:47:50 +00:00
|
|
|
width: (parent.width - 2 * parent.padding)
|
2018-07-08 18:12:22 +00:00
|
|
|
padding: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
title: "<font color=\"skyblue\">Audio Settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 5
|
|
|
|
|
2018-07-20 21:35:47 +00:00
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: resAudioTitle
|
|
|
|
text: qsTr("Audio configuration")
|
|
|
|
font.pointSize: 12
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: "white"
|
|
|
|
}
|
2018-07-18 02:39:16 +00:00
|
|
|
|
2018-07-20 21:35:47 +00:00
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
|
|
|
var saved_audio = prefs.audioConfig
|
|
|
|
currentIndex = 0
|
2018-09-08 06:16:13 +00:00
|
|
|
for (var i = 0; i < audioListModel.count; i++) {
|
|
|
|
var el_audio = audioListModel.get(i).val;
|
|
|
|
if (saved_audio === el_audio) {
|
|
|
|
currentIndex = i
|
|
|
|
break
|
|
|
|
}
|
2018-07-20 21:35:47 +00:00
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
activated(currentIndex)
|
2018-07-20 21:35:47 +00:00
|
|
|
}
|
2018-07-18 02:39:16 +00:00
|
|
|
|
2018-07-20 21:35:47 +00:00
|
|
|
id: audioComboBox
|
|
|
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: audioListModel
|
2018-09-08 05:51:56 +00:00
|
|
|
// Detection of audio channels only works on Windows
|
|
|
|
// and even so, it's still unreliable because audio devices
|
|
|
|
// lie about how many channels they can support. Hide the
|
|
|
|
// option to autodetect until this is resolved.
|
|
|
|
/*ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "Autodetect"
|
2018-07-20 21:35:47 +00:00
|
|
|
val: StreamingPreferences.AC_AUTO
|
2018-09-08 05:51:56 +00:00
|
|
|
}*/
|
2018-07-20 21:35:47 +00:00
|
|
|
ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "Stereo"
|
2018-07-20 21:35:47 +00:00
|
|
|
val: StreamingPreferences.AC_FORCE_STEREO
|
|
|
|
}
|
|
|
|
ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "5.1 surround sound"
|
2018-07-20 21:35:47 +00:00
|
|
|
val: StreamingPreferences.AC_FORCE_SURROUND
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
|
|
|
onActivated : {
|
|
|
|
prefs.audioConfig = audioListModel.get(currentIndex).val
|
2018-07-18 02:39:16 +00:00
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
2018-07-20 21:35:47 +00:00
|
|
|
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-20 22:47:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
padding: 10
|
|
|
|
anchors.left: settingsColumn1.right
|
|
|
|
id: settingsColumn2
|
|
|
|
width: settingsPage.width / 2 - padding
|
2018-07-08 18:12:22 +00:00
|
|
|
|
|
|
|
GroupBox {
|
|
|
|
id: gamepadSettingsGroupBox
|
2018-07-20 22:47:50 +00:00
|
|
|
width: (parent.width - parent.padding)
|
2018-07-08 18:12:22 +00:00
|
|
|
padding: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
title: "<font color=\"skyblue\">Gamepad Settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: multiControllerCheck
|
2018-07-08 18:20:56 +00:00
|
|
|
text: "<font color=\"white\">Multiple controller support</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
2018-07-09 05:56:38 +00:00
|
|
|
checked: prefs.multiController
|
|
|
|
onCheckedChanged: {
|
|
|
|
prefs.multiController = checked
|
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GroupBox {
|
|
|
|
id: hostSettingsGroupBox
|
2018-07-20 22:47:50 +00:00
|
|
|
width: (parent.width - parent.padding)
|
2018-07-08 18:12:22 +00:00
|
|
|
padding: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
title: "<font color=\"skyblue\">Host Settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: optimizeGameSettingsCheck
|
2018-07-08 18:20:56 +00:00
|
|
|
text: "<font color=\"white\">Optimize game settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
2018-07-09 05:56:38 +00:00
|
|
|
checked: prefs.gameOptimizations
|
|
|
|
onCheckedChanged: {
|
|
|
|
prefs.gameOptimizations = checked
|
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: audioPcCheck
|
2018-07-09 05:56:38 +00:00
|
|
|
text: "<font color=\"white\">Play audio on host PC</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
2018-07-09 05:56:38 +00:00
|
|
|
checked: prefs.playAudioOnHost
|
|
|
|
onCheckedChanged: {
|
|
|
|
prefs.playAudioOnHost = checked
|
|
|
|
}
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GroupBox {
|
|
|
|
id: advancedSettingsGroupBox
|
2018-07-20 22:47:50 +00:00
|
|
|
width: (parent.width - parent.padding)
|
2018-07-08 18:12:22 +00:00
|
|
|
padding: 12
|
2018-07-08 18:20:56 +00:00
|
|
|
title: "<font color=\"skyblue\">Advanced Settings</font>"
|
2018-07-08 18:12:22 +00:00
|
|
|
font.pointSize: 12
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 5
|
|
|
|
|
2018-07-20 21:14:38 +00:00
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: resVDSTitle
|
|
|
|
text: qsTr("Video decoder")
|
|
|
|
font.pointSize: 12
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: "white"
|
2018-07-08 18:12:22 +00:00
|
|
|
}
|
2018-07-20 21:14:38 +00:00
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
|
|
|
var saved_vds = prefs.videoDecoderSelection
|
|
|
|
currentIndex = 0
|
2018-09-08 06:16:13 +00:00
|
|
|
for (var i = 0; i < decoderListModel.count; i++) {
|
2018-07-20 21:14:38 +00:00
|
|
|
var el_vds = decoderListModel.get(i).val;
|
2018-09-08 06:16:13 +00:00
|
|
|
if (saved_vds === el_vds) {
|
|
|
|
currentIndex = i
|
|
|
|
break
|
|
|
|
}
|
2018-07-20 21:14:38 +00:00
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
activated(currentIndex)
|
2018-07-20 21:14:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
id: decoderComboBox
|
|
|
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: decoderListModel
|
|
|
|
ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "Automatic (Recommended)"
|
2018-07-20 21:14:38 +00:00
|
|
|
val: StreamingPreferences.VDS_AUTO
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "Force software decoding"
|
|
|
|
val: StreamingPreferences.VDS_FORCE_SOFTWARE
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "Force hardware decoding"
|
|
|
|
val: StreamingPreferences.VDS_FORCE_HARDWARE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
|
|
|
onActivated : {
|
|
|
|
prefs.videoDecoderSelection = decoderListModel.get(currentIndex).val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-20 21:22:22 +00:00
|
|
|
Label {
|
|
|
|
width: parent.width
|
|
|
|
id: resVCCTitle
|
|
|
|
text: qsTr("Video codec")
|
|
|
|
font.pointSize: 12
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
color: "white"
|
|
|
|
}
|
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
// ignore setting the index at first, and actually set it when the component is loaded
|
|
|
|
Component.onCompleted: {
|
|
|
|
var saved_vcc = prefs.videoCodecConfig
|
|
|
|
currentIndex = 0
|
|
|
|
for(var i = 0; i < codecListModel.count; i++) {
|
|
|
|
var el_vcc = codecListModel.get(i).val;
|
2018-09-08 06:16:13 +00:00
|
|
|
if (saved_vcc === el_vcc) {
|
|
|
|
currentIndex = i
|
|
|
|
break
|
|
|
|
}
|
2018-07-20 21:22:22 +00:00
|
|
|
}
|
2018-09-08 06:16:13 +00:00
|
|
|
activated(currentIndex)
|
2018-07-20 21:22:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
id: codecComboBox
|
|
|
|
width: Math.min(bitrateDesc.implicitWidth, parent.width)
|
|
|
|
textRole: "text"
|
|
|
|
model: ListModel {
|
|
|
|
id: codecListModel
|
|
|
|
ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "Automatic (Recommended)"
|
2018-07-20 21:22:22 +00:00
|
|
|
val: StreamingPreferences.VCC_AUTO
|
|
|
|
}
|
|
|
|
ListElement {
|
2018-07-28 10:06:11 +00:00
|
|
|
text: "Force H.264"
|
2018-07-20 21:22:22 +00:00
|
|
|
val: StreamingPreferences.VCC_FORCE_H264
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "Force HEVC"
|
|
|
|
val: StreamingPreferences.VCC_FORCE_HEVC
|
|
|
|
}
|
2018-07-28 10:06:11 +00:00
|
|
|
// HDR seems to be broken in GFE 3.14.1, and even when that's fixed
|
|
|
|
// we'll probably need to gate this feature on OS support in our
|
|
|
|
// renderers.
|
|
|
|
/* ListElement {
|
2018-07-20 21:22:22 +00:00
|
|
|
text: "Force HEVC HDR"
|
|
|
|
val: StreamingPreferences.VCC_FORCE_HEVC_HDR
|
2018-07-28 10:06:11 +00:00
|
|
|
} */
|
2018-07-20 21:22:22 +00:00
|
|
|
}
|
|
|
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
|
|
|
onActivated : {
|
|
|
|
prefs.videoCodecConfig = codecListModel.get(currentIndex).val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-08 17:19:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-07-08 05:15:02 +00:00
|
|
|
}
|