diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-21 23:47:24 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-21 23:47:24 +0100 |
commit | 2ec59c6812ef2112dde2a7ce8c068d0c8155ed06 (patch) | |
tree | 67e217d1c507879362882ab4ddc59f6bfd30da18 /src/main.cpp | |
parent | a0d8af9d372ac3847cbae9dc9c647abf57227e3c (diff) |
Add alt+f2 to take a screenshot of a region
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 169721e..7c10a6e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,11 @@ static void rpc_add_commands(gsr::Rpc *rpc, gsr::Overlay *overlay) { fprintf(stderr, "rpc command executed: %s\n", name.c_str()); overlay->take_screenshot(); }); + + rpc->add_handler("take-screenshot-region", [overlay](const std::string &name) { + fprintf(stderr, "rpc command executed: %s\n", name.c_str()); + overlay->take_screenshot_region(); + }); } static bool is_gsr_ui_virtual_keyboard_running() { |