From 3457071db1150b364324e9aeea67ef532b629690 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Wed, 16 May 2018 10:16:48 +0300 Subject: [PATCH] Recorder: support stabilization via hotkey --- src/bin/recorder.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/bin/recorder.c b/src/bin/recorder.c index 1e596e4..20d9286 100644 --- a/src/bin/recorder.c +++ b/src/bin/recorder.c @@ -25,6 +25,7 @@ #include "exactness_private.h" #define MAX_PATH 1024 +#define STABILIZE_KEY_STR "F1" #define SHOT_KEY_STR "F2" #define SAVE_KEY_STR "F3" @@ -183,6 +184,12 @@ _event_key_cb(void *data, const Efl_Event *event) if (n_evas >= 0) _add_to_list(EXACTNESS_ACTION_TAKE_SHOT, n_evas, timestamp, NULL, 0); return; } + if (!strcmp(key, STABILIZE_KEY_STR)) + { + _printf(2, "Stabilize: %s timestamp=<%u>\n", __func__, timestamp); + if (n_evas >= 0) _add_to_list(EXACTNESS_ACTION_STABILIZE, n_evas, timestamp, NULL, 0); + return; + } if (!strcmp(key, SAVE_KEY_STR)) { _output_write(); @@ -193,7 +200,7 @@ _event_key_cb(void *data, const Efl_Event *event) } else { - if (!strcmp(key, _shot_key) || !strcmp(key, SAVE_KEY_STR)) return; + if (!strcmp(key, _shot_key) || !strcmp(key, SAVE_KEY_STR) || !strcmp(key, STABILIZE_KEY_STR)) return; } if (_unit) { /* Construct duplicate strings, free them when list if freed */ @@ -345,7 +352,10 @@ static const Ecore_Getopt optdesc = { PACKAGE_VERSION, "(C) 2017 Enlightenment", "BSD", - "A scenario recorder for EFL based applications.", + "A scenario recorder for EFL based applications.\n" + "\tF1 - Request stabilization\n" + "\tF2 - Request shot\n" + "\tF3 - Request to save the scenario\n", 1, { ECORE_GETOPT_STORE_STR('t', "test", "Name of the filename where to store the test."),