feat(state): save more data in files
Clang Lint CI / lint-no-video (push) Successful in 1m24s
Clang Build CI / run-no-video (push) Successful in 1m29s
Clang Build CI / run-video (push) Successful in 1m41s
Clang Build CI / build-release (push) Successful in 2m48s
Clang Lint CI / lint-video (push) Successful in 1m48s
Clang Lint CI / lint-no-video (push) Successful in 1m24s
Clang Build CI / run-no-video (push) Successful in 1m29s
Clang Build CI / run-video (push) Successful in 1m41s
Clang Build CI / build-release (push) Successful in 2m48s
Clang Lint CI / lint-video (push) Successful in 1m48s
This commit is contained in:
+29
@@ -186,6 +186,35 @@ static void save_to_file(const Context *context, StateConfig state_config,
|
||||
|
||||
lines.length = 0;
|
||||
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "time=%f", context->time);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
log_error("Too many values to save");
|
||||
return;
|
||||
}
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "beats=%f",
|
||||
context->tempo_total);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
log_error("Too many values to save");
|
||||
return;
|
||||
}
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "demo=%d",
|
||||
context->demo ? 1 : 0);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
log_error("Too many values to save");
|
||||
return;
|
||||
}
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "auto_random=%d",
|
||||
context->auto_random ? 1 : 0);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
log_error("Too many values to save");
|
||||
return;
|
||||
}
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "auto_random_cycle=%d",
|
||||
context->auto_random_cycle);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
log_error("Too many values to save");
|
||||
return;
|
||||
}
|
||||
snprintf(lines.values[lines.length++], STR_LEN, "tempo=%d",
|
||||
(unsigned int)context->tempo.tempo);
|
||||
if (lines.length > ARRAY_SIZE) {
|
||||
|
||||
Reference in New Issue
Block a user