diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-03-17 18:35:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-03-17 18:35:16 +0100 |
commit | 58299fbb24f4b44c9d11ec8b4d9a1878d2280dea (patch) | |
tree | 745c3e07e0c61fec781899921bf68e8a7dbf5a21 /src/config.hpp | |
parent | eb8eaf0defcda83ede12ecb94b176af0de4fb0ac (diff) |
Add overclocking option to workaround a NVIDIA driver bug (forcefully set to p2 state when using cuda)
Diffstat (limited to 'src/config.hpp')
-rw-r--r-- | src/config.hpp | 14 |
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()); |