aboutsummaryrefslogtreecommitdiff
path: root/src/config.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-29 01:53:30 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-29 01:53:30 +0100
commitff26b9b60c2e9084fbf86c93b5974407061df2a5 (patch)
tree6dd9a7d599d0c632619aef8b21b5d06d122379bb /src/config.hpp
parent9d94266c63b91ba873aa9ebf80e38d53da59baa1 (diff)
Add av1 option, add option to install polkit rule in flatpak to remove password prompts
Diffstat (limited to 'src/config.hpp')
-rw-r--r--src/config.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp
index 20614aa..cf1d75f 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -31,6 +31,7 @@ struct MainConfig {
std::string framerate_mode;
bool advanced_view = false;
bool overclock = false;
+ bool polkit_rule_installed = false;
};
struct StreamingConfig {
@@ -277,6 +278,11 @@ static Config read_config(bool &config_empty) {
config.main_config.overclock = true;
else if(value == "false")
config.main_config.overclock = false;
+ } else if(key == "main.polkit_rule_installed") {
+ if(value == "true")
+ config.main_config.polkit_rule_installed = true;
+ else if(value == "false")
+ config.main_config.polkit_rule_installed = false;
} else if(key == "streaming.service") {
config.streaming_config.streaming_service.assign(value.str, value.size);
} else if(key == "streaming.key") {
@@ -364,6 +370,7 @@ static void save_config(const Config &config) {
fprintf(file, "main.framerate_mode %s\n", config.main_config.framerate_mode.c_str());
fprintf(file, "main.advanced_view %s\n", config.main_config.advanced_view ? "true" : "false");
fprintf(file, "main.overclock %s\n", config.main_config.overclock ? "true" : "false");
+ fprintf(file, "main.polkit_rule_installed %s\n", config.main_config.polkit_rule_installed ? "true" : "false");
fprintf(file, "streaming.service %s\n", config.streaming_config.streaming_service.c_str());
fprintf(file, "streaming.key %s\n", config.streaming_config.stream_key.c_str());