diff --git a/dashboard/qml/Main.qml b/dashboard/qml/Main.qml index e3e14a0b..4854befe 100644 --- a/dashboard/qml/Main.qml +++ b/dashboard/qml/Main.qml @@ -305,11 +305,12 @@ Kirigami.ApplicationWindow { level: 1 wrapMode: Text.WordWrap text: i18n("Steam information") - opacity: root.server_started + opacity: steam_info.opacity Layout.maximumHeight: root.server_started ? -1 : 0 } SteamLaunchOptions { - opacity: root.server_started + id: steam_info + opacity: root.server_started && WivrnServer.steamCommand != "" Layout.maximumHeight: root.server_started ? -1 : 0 } diff --git a/server/main.cpp b/server/main.cpp index ae4914fe..610ddfba 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -678,14 +678,18 @@ void on_json_configuration(WivrnServer * server, const GParamSpec * pspec, gpoin std::filesystem::path config_new = config; config_new += ".new"; - std::ofstream file(config_new); - file.write(json, strlen(json)); + { + std::ofstream file(config_new); + file.write(json, strlen(json)); + } std::error_code ec; std::filesystem::rename(config_new, config, ec); if (ec) std::cerr << "Failed to save configuration: " << ec.message() << std::endl; + + wivrn_server_set_steam_command(dbus_server, steam_command().c_str()); } void expose_known_keys_on_dbus()