Better replay recording handling. Add gsr-ui-cli command to save shorter replay

This commit is contained in:
dec05eba
2025-04-23 19:27:57 +02:00
parent 736f2f3095
commit 41412db704
5 changed files with 31 additions and 6 deletions

View File

@@ -78,6 +78,16 @@ static void rpc_add_commands(gsr::Rpc *rpc, gsr::Overlay *overlay) {
overlay->save_replay();
});
rpc->add_handler("replay-save-1-min", [overlay](const std::string &name) {
fprintf(stderr, "rpc command executed: %s\n", name.c_str());
overlay->save_replay_1_min();
});
rpc->add_handler("replay-save-10-min", [overlay](const std::string &name) {
fprintf(stderr, "rpc command executed: %s\n", name.c_str());
overlay->save_replay_10_min();
});
rpc->add_handler("take-screenshot", [overlay](const std::string &name) {
fprintf(stderr, "rpc command executed: %s\n", name.c_str());
overlay->take_screenshot();