Helper: write recording only if needed
This commit is contained in:
parent
ee1e8f77e1
commit
781f294654
|
@ -153,6 +153,7 @@ main(int argc, char *argv[])
|
|||
const char *rec_file = NULL, *comp1 = NULL, *comp2 = NULL;
|
||||
int ret = 0, args = 0;
|
||||
unsigned short delay = 0;
|
||||
Eina_Bool write_file = EINA_FALSE;
|
||||
Eina_Bool want_quit, clean = EINA_FALSE, list_get = EINA_FALSE, compare_files = EINA_FALSE;
|
||||
Ecore_Getopt_Value values[] = {
|
||||
ECORE_GETOPT_VALUE_USHORT(delay),
|
||||
|
@ -228,6 +229,7 @@ main(int argc, char *argv[])
|
|||
{
|
||||
list->first_timestamp = evt_time_get(0, eina_list_data_get(list->variant_list));
|
||||
}
|
||||
write_file = EINA_TRUE;
|
||||
}
|
||||
|
||||
if (delay)
|
||||
|
@ -239,6 +241,7 @@ main(int argc, char *argv[])
|
|||
list->first_timestamp = evt_time_get(0, eina_list_data_get(list->variant_list));
|
||||
}
|
||||
list->first_timestamp -= delay;
|
||||
write_file = EINA_TRUE;
|
||||
}
|
||||
|
||||
if (list_get)
|
||||
|
@ -291,7 +294,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (rec_file) write_events(rec_file, list);
|
||||
if (rec_file && write_file) write_events(rec_file, list);
|
||||
|
||||
end:
|
||||
ecore_shutdown();
|
||||
|
|
Loading…
Reference in New Issue