Add option to disable hotkeys, add gsr-ui-cli tool to control gsr-ui remotely

This commit is contained in:
dec05eba
2025-01-03 22:35:49 +01:00
parent 5439fa8a71
commit 6c03137610
10 changed files with 217 additions and 16 deletions

View File

@@ -43,6 +43,7 @@ namespace gsr {
struct MainConfig {
int32_t config_file_version = 0;
bool software_encoding_warning_shown = false;
bool enable_hotkeys = true;
std::string tint_color;
};

View File

@@ -58,6 +58,8 @@ namespace gsr {
bool is_open() const;
bool should_exit(std::string &reason) const;
void exit();
const Config& get_config() const;
private:
void xi_setup();
void handle_xi_events();

View File

@@ -31,6 +31,7 @@ namespace gsr {
private:
std::unique_ptr<Subsection> create_appearance_subsection(ScrollablePage *parent_page);
std::unique_ptr<Subsection> create_startup_subsection(ScrollablePage *parent_page);
std::unique_ptr<Subsection> create_hotkey_subsection(ScrollablePage *parent_page);
std::unique_ptr<Button> create_exit_program_button();
std::unique_ptr<Button> create_go_back_to_old_ui_button();
std::unique_ptr<Subsection> create_application_options_subsection(ScrollablePage *parent_page);
@@ -43,5 +44,6 @@ namespace gsr {
PageStack *page_stack = nullptr;
RadioButton *tint_color_radio_button_ptr = nullptr;
RadioButton *startup_radio_button_ptr = nullptr;
RadioButton *enable_hotkeys_radio_button_ptr = nullptr;
};
}