Change joystick button to save replay. Add joystick buttons for more actions.

This commit is contained in:
dec05eba
2025-03-17 22:04:02 +01:00
parent f9e1e3ec26
commit a6bd165d97
5 changed files with 71 additions and 22 deletions

View File

@@ -339,6 +339,21 @@ namespace gsr {
overlay->save_replay();
});
global_hotkeys_js->bind_action("take_screenshot", [overlay](const std::string &id) {
fprintf(stderr, "pressed %s\n", id.c_str());
overlay->take_screenshot();
});
global_hotkeys_js->bind_action("toggle_record", [overlay](const std::string &id) {
fprintf(stderr, "pressed %s\n", id.c_str());
overlay->toggle_record();
});
global_hotkeys_js->bind_action("toggle_replay", [overlay](const std::string &id) {
fprintf(stderr, "pressed %s\n", id.c_str());
overlay->toggle_replay();
});
return global_hotkeys_js;
}