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

This commit is contained in:
2026-08-29 11:29:11 +02:00
parent 1f7291fce9
commit 9d300a69c1
+29
View File
@@ -186,6 +186,35 @@ static void save_to_file(const Context *context, StateConfig state_config,
lines.length = 0; 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", snprintf(lines.values[lines.length++], STR_LEN, "tempo=%d",
(unsigned int)context->tempo.tempo); (unsigned int)context->tempo.tempo);
if (lines.length > ARRAY_SIZE) { if (lines.length > ARRAY_SIZE) {