diff --git a/include/Utils.hpp b/include/Utils.hpp index 1415209..38088be 100644 --- a/include/Utils.hpp +++ b/include/Utils.hpp @@ -15,6 +15,7 @@ namespace gsr { void string_split_char(std::string_view str, char delimiter, StringSplitCallback callback_func); bool starts_with(std::string_view str, const char *substr); + bool ends_with(std::string_view str, const char *substr); std::string get_home_dir(); std::string get_config_dir(); diff --git a/include/gui/SettingsPage.hpp b/include/gui/SettingsPage.hpp index ae4b480..2a78802 100644 --- a/include/gui/SettingsPage.hpp +++ b/include/gui/SettingsPage.hpp @@ -20,6 +20,11 @@ namespace gsr { class LineSeparator; class Subsection; + enum class AudioDeviceType { + OUTPUT, + INPUT + }; + class SettingsPage : public StaticPage { public: enum class Type { @@ -54,11 +59,12 @@ namespace gsr { std::unique_ptr create_restore_portal_session_section(); std::unique_ptr create_change_video_resolution_section(); std::unique_ptr create_capture_target_section(); - std::unique_ptr create_audio_device_selection_combobox(); + std::unique_ptr create_audio_device_selection_combobox(AudioDeviceType device_type); std::unique_ptr