Remove server foveation config, rework defaults
This commit is contained in:
@@ -23,64 +23,6 @@ Kirigami.ScrollablePage {
|
||||
|
||||
Kirigami.FormLayout {
|
||||
|
||||
Controls.CheckBox {
|
||||
id: manual_foveation
|
||||
checked: Settings.scale != -1
|
||||
Layout.row: 0
|
||||
Layout.column: 0
|
||||
text: i18nc("automatic foveation setup", "Manual foveation")
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
columns: 5
|
||||
enabled: manual_foveation.checked
|
||||
Kirigami.FormData.label: i18n("Foveation strength:")
|
||||
|
||||
Controls.Slider {
|
||||
id: scale_slider
|
||||
Layout.row: 0
|
||||
Layout.column: 0
|
||||
Layout.columnSpan: 3
|
||||
implicitWidth: 20 * Kirigami.Units.gridUnit
|
||||
from: 0
|
||||
to: 80
|
||||
stepSize: 1
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
Layout.row: 0
|
||||
Layout.column: 3
|
||||
text: i18n("%1 %", scale_slider.value)
|
||||
}
|
||||
|
||||
Kirigami.ContextualHelpButton {
|
||||
Layout.row: 0
|
||||
Layout.column: 4
|
||||
toolTipText: i18n("A stronger foveation makes the image sharper in the center than in the periphery and makes the decoding faster. This is better for fast paced games.\n\nA weaker foveation gives a uniform sharpness in the whole image.\n\nThe recommended values are between 20% and 50% for headsets without eye tracking and between 50% and 70% for headsets with eye tracking.")
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
Layout.row: 1
|
||||
Layout.column: 0
|
||||
text: i18nc("weaker foveation", "Weaker")
|
||||
}
|
||||
Item {
|
||||
Layout.row: 1
|
||||
Layout.column: 1
|
||||
// spacer item
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Controls.Label {
|
||||
Layout.row: 1
|
||||
Layout.column: 2
|
||||
text: i18nc("stronger foveation", "Stronger")
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Separator {
|
||||
Kirigami.FormData.isSection: true
|
||||
}
|
||||
|
||||
Controls.SpinBox {
|
||||
id: bitrate
|
||||
Kirigami.FormData.label: i18n("Bitrate:")
|
||||
@@ -380,7 +322,6 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
function save() {
|
||||
Settings.scale = manual_foveation.checked ? 1 - scale_slider.value / 100.0 : -1;
|
||||
let openvr = openvr_combobox.model.get(openvr_combobox.currentIndex)
|
||||
if (openvr.is_custom) {
|
||||
Settings.openvr = openvr_text.text;
|
||||
@@ -399,12 +340,6 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
function load() {
|
||||
if (Settings.scale > 0) {
|
||||
scale_slider.value = Math.round(100 - Settings.scale * 100);
|
||||
} else {
|
||||
scale_slider.value = 50;
|
||||
}
|
||||
|
||||
debug_gui.checked = Settings.debugGui;
|
||||
steamvr_lh.checked = Settings.steamVrLh;
|
||||
hid_forwarding.checked = Settings.hidForwarding;
|
||||
|
||||
@@ -115,7 +115,6 @@ void Settings::emitAllChanged()
|
||||
codecChanged();
|
||||
tenbitChanged();
|
||||
bitrateChanged();
|
||||
scaleChanged();
|
||||
tcpOnlyChanged();
|
||||
applicationChanged();
|
||||
openvrChanged();
|
||||
@@ -334,26 +333,6 @@ void Settings::set_bitrate(const int & value)
|
||||
bitrateChanged();
|
||||
}
|
||||
|
||||
float Settings::scale() const
|
||||
{
|
||||
// Foveation
|
||||
auto it = m_jsonSettings.find("scale");
|
||||
if (it != m_jsonSettings.end() and it->is_number())
|
||||
return *it;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Settings::set_scale(const float & value)
|
||||
{
|
||||
auto old = scale();
|
||||
if (value == -1)
|
||||
m_jsonSettings.erase("scale");
|
||||
else
|
||||
m_jsonSettings["scale"] = value;
|
||||
if (old != value)
|
||||
scaleChanged();
|
||||
}
|
||||
|
||||
QString Settings::application() const
|
||||
{
|
||||
// Automatically started application
|
||||
@@ -521,7 +500,6 @@ void Settings::save(wivrn_server * server)
|
||||
void Settings::restore_defaults()
|
||||
{
|
||||
m_jsonSettings.erase("encoder");
|
||||
m_jsonSettings.erase("scale");
|
||||
m_jsonSettings.erase("bitrate");
|
||||
m_jsonSettings.erase("application");
|
||||
m_jsonSettings.erase("hid-forwarding");
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
Q_PROPERTY(bool can10bit READ can10bit NOTIFY codecChanged)
|
||||
Q_PROPERTY(bool tenbit READ tenbit WRITE set_tenbit NOTIFY tenbitChanged)
|
||||
Q_PROPERTY(int bitrate READ bitrate WRITE set_bitrate NOTIFY bitrateChanged)
|
||||
Q_PROPERTY(float scale READ scale WRITE set_scale NOTIFY scaleChanged)
|
||||
|
||||
Q_PROPERTY(bool tcpOnly READ tcpOnly WRITE set_tcpOnly NOTIFY tcpOnlyChanged)
|
||||
Q_PROPERTY(QString application READ application WRITE set_application NOTIFY applicationChanged)
|
||||
@@ -87,7 +86,6 @@ public:
|
||||
SETTER_GETTER_NOTIFY(video_codec, codec)
|
||||
SETTER_GETTER_NOTIFY(bool, tenbit)
|
||||
SETTER_GETTER_NOTIFY(int, bitrate)
|
||||
SETTER_GETTER_NOTIFY(float, scale)
|
||||
SETTER_GETTER_NOTIFY(QString, application)
|
||||
SETTER_GETTER_NOTIFY(bool, hidForwarding)
|
||||
SETTER_GETTER_NOTIFY(bool, debugGui)
|
||||
|
||||
Reference in New Issue
Block a user