From 9bbec944dea8942fe35225e427508bcced48336b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 24 Aug 2025 21:48:39 +0200 Subject: [PATCH] GlobalSettings: Add notification speed setting, change recording start notification speed --- include/Config.hpp | 1 + include/Overlay.hpp | 8 ++++++ include/gui/GlobalSettingsPage.hpp | 2 ++ src/Config.cpp | 1 + src/Overlay.cpp | 42 +++++++++++++++++++++++++----- src/gui/GlobalSettingsPage.cpp | 40 +++++++++++++++++++++++++--- 6 files changed, 83 insertions(+), 11 deletions(-) diff --git a/include/Config.hpp b/include/Config.hpp index 7fb9734..1584b64 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -68,6 +68,7 @@ namespace gsr { std::string hotkeys_enable_option = "enable_hotkeys"; std::string joystick_hotkeys_enable_option = "disable_hotkeys"; std::string tint_color; + std::string notification_speed = "normal"; ConfigHotkey show_hide_hotkey; }; diff --git a/include/Overlay.hpp b/include/Overlay.hpp index 353993c..b10833a 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -47,6 +47,11 @@ namespace gsr { WINDOW }; + enum class NotificationSpeed { + NORMAL, + FAST + }; + class Overlay { public: Overlay(std::string resources_path, GsrInfo gsr_info, SupportedCaptureOptions capture_options, egl_functions egl_funcs); @@ -81,6 +86,8 @@ namespace gsr { void unbind_all_keyboard_hotkeys(); void rebind_all_keyboard_hotkeys(); + + void set_notification_speed(NotificationSpeed notification_speed); private: void handle_keyboard_mapping_event(); void on_event(mgl::Event &event); @@ -245,5 +252,6 @@ namespace gsr { mgl::Clock cursor_tracker_update_clock; bool hide_ui = false; + double notification_duration_multiplier = 1.0; }; } \ No newline at end of file diff --git a/include/gui/GlobalSettingsPage.hpp b/include/gui/GlobalSettingsPage.hpp index e120d69..e54da8c 100644 --- a/include/gui/GlobalSettingsPage.hpp +++ b/include/gui/GlobalSettingsPage.hpp @@ -70,6 +70,7 @@ namespace gsr { std::unique_ptr create_controller_hotkey_subsection(ScrollablePage *parent_page); std::unique_ptr