aboutsummaryrefslogtreecommitdiff
path: root/src/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.hpp')
-rw-r--r--src/config.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp
index bd43166..275f9f9 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -26,6 +26,8 @@ struct MainConfig {
std::string quality;
std::string codec; // Video codec
std::string audio_codec;
+ bool advanced_view = false;
+ bool overclock = false;
};
struct StreamingConfig {
@@ -245,6 +247,16 @@ static Config read_config() {
config.main_config.codec.assign(value.str, value.size);
} else if(key == "main.audio_codec") {
config.main_config.audio_codec.assign(value.str, value.size);
+ } else if(key == "main.advanced_view") {
+ if(value == "true")
+ config.main_config.advanced_view = true;
+ else if(value == "false")
+ config.main_config.advanced_view = false;
+ } else if(key == "main.overclock") {
+ if(value == "true")
+ config.main_config.overclock = true;
+ else if(value == "false")
+ config.main_config.overclock = false;
} else if(key == "streaming.service") {
config.streaming_config.streaming_service.assign(value.str, value.size);
} else if(key == "streaming.key") {
@@ -329,6 +341,8 @@ static void save_config(const Config &config) {
fprintf(file, "main.quality %s\n", config.main_config.quality.c_str());
fprintf(file, "main.codec %s\n", config.main_config.codec.c_str());
fprintf(file, "main.audio_codec %s\n", config.main_config.audio_codec.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, "streaming.service %s\n", config.streaming_config.streaming_service.c_str());
fprintf(file, "streaming.key %s\n", config.streaming_config.stream_key.c_str());