From 2ec59c6812ef2112dde2a7ce8c068d0c8155ed06 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 21 Mar 2025 23:47:24 +0100 Subject: Add alt+f2 to take a screenshot of a region --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') 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() { -- cgit v1.2.3-70-g09d2