From 4ea5ada9050d22fcb7eed67a72358bce11c9b3df Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 10 Aug 2024 00:45:36 +0200 Subject: Settings page save settings, refactor --- include/Config.hpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'include/Config.hpp') diff --git a/include/Config.hpp b/include/Config.hpp index 154bdb0..63e7984 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -1,8 +1,10 @@ #pragma once -#include "Utils.hpp" #include +#include +#include +#include namespace gsr { struct ConfigHotkey { @@ -16,19 +18,15 @@ namespace gsr { int32_t record_area_height = 0; int32_t fps = 60; bool merge_audio_tracks = true; - std::vector audio_input; + std::vector audio_tracks; std::string color_range; - std::string quality; + std::string video_quality; std::string video_codec; std::string audio_codec; std::string framerate_mode; bool advanced_view = false; bool overclock = false; - bool show_recording_started_notifications = false; - bool show_recording_stopped_notifications = false; - bool show_recording_saved_notifications = true; bool record_cursor = true; - bool hide_window_when_recording = false; bool restore_portal_session = true; }; @@ -52,6 +50,8 @@ namespace gsr { struct StreamingConfig { RecordOptions record_options; + bool show_streaming_started_notifications = true; + bool show_streaming_stopped_notifications = true; std::string streaming_service; YoutubeStreamConfig youtube; TwitchStreamConfig twitch; @@ -61,6 +61,8 @@ namespace gsr { struct RecordConfig { RecordOptions record_options; + bool show_recording_started_notifications = true; + bool show_video_saved_notifications = true; std::string save_directory; std::string container; ConfigHotkey start_stop_recording_hotkey; @@ -69,6 +71,9 @@ namespace gsr { struct ReplayConfig { RecordOptions record_options; + bool show_replay_started_notifications = true; + bool show_replay_stopped_notifications = true; + bool show_replay_saved_notifications = true; std::string save_directory; std::string container; int32_t replay_time = 60; @@ -83,6 +88,6 @@ namespace gsr { ReplayConfig replay_config; }; - Config read_config(bool &config_empty); + std::optional read_config(); void save_config(Config &config); } \ No newline at end of file -- cgit v1.2.3