From 206ec7115091fafaacd0ef77ea6b83ec7fcd4e68 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 17 Feb 2026 23:24:08 +0100 Subject: [PATCH] Fix config reset when selecting app --- dashboard/qml/SelectGame.qml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/dashboard/qml/SelectGame.qml b/dashboard/qml/SelectGame.qml index cd35a9bf..58728728 100644 --- a/dashboard/qml/SelectGame.qml +++ b/dashboard/qml/SelectGame.qml @@ -7,8 +7,6 @@ import io.github.wivrn.wivrn ColumnLayout { id: select_game - property bool json_loaded: false - Component.onCompleted: { apps.append({ "name": i18nc("don't start an application automatically", "None"), @@ -75,13 +73,8 @@ ColumnLayout { } } - function reload() { - select_game.json_loaded = false; - load(); - } - function load() { - if (select_game.json_loaded || WivrnServer.serverStatus != WivrnServer.Started || WivrnServer.jsonConfiguration == "") + if (WivrnServer.jsonConfiguration == "") return; Settings.load(WivrnServer); @@ -103,22 +96,12 @@ ColumnLayout { app_text.text = Settings.application; app_combobox.currentIndex = custom_idx; } - - select_game.json_loaded = true; } function save() { - var new_application; - if (apps.get(app_combobox.currentIndex).is_custom) - new_application = app_text.text; + Settings.application = app_text.text; else - new_application = apps.get(app_combobox.currentIndex).command; - - Settings.load(WivrnServer); - if (Settings.application != new_application) { - Settings.application = new_application; - Settings.save(WivrnServer); - } + Settings.application = apps.get(app_combobox.currentIndex).command; } }