summaryrefslogtreecommitdiff
path: root/src/c/fastforge.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-14 22:39:48 +0300
committerPaul Buetow <paul@buetow.org>2026-04-14 22:39:48 +0300
commit5b0654e957c28a72957c88921bb6a785b09b08e9 (patch)
tree2c5c55bea0f3012bb1c84f9c1f976e61f3a6398e /src/c/fastforge.c
parent974fdc556c7a52c167229bc41fec85b175e53c8e (diff)
fix: show elapsed in seconds when <60s in edit-running window
When a fast was just started, DOWN appeared to do nothing because format_duration_hours_minutes rounds to minutes — both 8s and 0s display as "0h 00m". Now the edit window shows the exact seconds (e.g. "Elapsed 8s") for sub-minute elapsed times, giving clear feedback when UP/DOWN adjustments change the value. Also adds 'just reset-flash' recipe to recover from SPI flash corruption that causes the emulator to hang on the boot screen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/c/fastforge.c')
-rw-r--r--src/c/fastforge.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/c/fastforge.c b/src/c/fastforge.c
index f128592..dd2a976 100644
--- a/src/c/fastforge.c
+++ b/src/c/fastforge.c
@@ -1037,7 +1037,13 @@ static void refresh_running_edit_window_content(void) {
elapsed = 0;
}
char elapsed_text[20];
- format_duration_hours_minutes(elapsed, elapsed_text, sizeof(elapsed_text));
+ if (elapsed < 60) {
+ /* Show seconds when elapsed is sub-minute so the user can see DOWN/UP
+ * adjustments that would otherwise be invisible at "0h 00m" resolution. */
+ snprintf(elapsed_text, sizeof(elapsed_text), "%ds", (int)elapsed);
+ } else {
+ format_duration_hours_minutes(elapsed, elapsed_text, sizeof(elapsed_text));
+ }
snprintf(s_running_edit_start_text, sizeof(s_running_edit_start_text), "Start %s", start_text);
snprintf(s_running_edit_elapsed_text, sizeof(s_running_edit_elapsed_text), "Elapsed %s", elapsed_text);