From eaf5d404450c4e467b981db1ea79c6871667a52e Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 25 Aug 2023 11:37:02 +0200 Subject: Add global BPM behaviour --- src/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ae14d87..68049ee 100644 --- a/src/main.c +++ b/src/main.c @@ -146,11 +146,11 @@ render_settings(void) { y0 += 17; draw_rect(x0, y0, x1, y0 + 10, COL_FG); txt_drawf("MUTE", x0 + 2, y0 + 1, COL_FG); - txt_drawf("OFF", x1 + 8, y0 + 1, COL_FG); + txt_drawf("%s", x1 + 8, y0 + 1, COL_FG, toggle_settings_str[settings.global_mute]); y0 += 17; draw_rect(x0, y0, x1, y0 + 10, COL_FG); txt_drawf("BPM", x0 + 2, y0 + 1, COL_FG); - txt_drawf("OFF", x1 + 8, y0 + 1, COL_FG); + txt_drawf("%s", x1 + 8, y0 + 1, COL_FG, toggle_settings_str[settings.global_bpm]); y0 += 17; txt_drawf("GENERAL", x0, y0, COL_FG); @@ -158,7 +158,7 @@ render_settings(void) { y0 += 17; draw_rect(x0, y0, x1, y0 + 10, COL_FG); txt_drawf("AUTO-SAVE", x0 + 2, y0 + 1, COL_FG); - txt_drawf("OFF", x1 + 8, y0 + 1, COL_FG); + txt_drawf("%s", x1 + 8, y0 + 1, COL_FG, toggle_settings_str[settings.auto_save]); y0 += 17; draw_rect(x0, y0, x1, y0 + 10, COL_FG); txt_drawf("SYNC", x0 + 2, y0 + 1, COL_FG); @@ -170,7 +170,7 @@ render_settings(void) { y0 += 17; draw_rect(x0, y0, x1, y0 + 10, COL_FG); txt_drawf("HELP", x0 + 2, y0 + 1, COL_FG); - txt_drawf("%s", x1 + 8, y0 + 1, COL_FG, help_setting_str[settings.help]); + txt_drawf("%s", x1 + 8, y0 + 1, COL_FG, toggle_settings_str[settings.help]); PROF(draw_settings_cursor(), draw_cursor_cycles); } @@ -224,7 +224,11 @@ update(void) { last_pattern_loc = pattern_selection_loc; last_right_col_loc = right_col_selection_loc; if (update_bpm) { - set_time(patterns[current_pattern].bpm); + if (settings.global_bpm) { + set_time(settings.bpm); + } else { + set_time(patterns[current_pattern].bpm); + } update_bpm = false; } if (audio_sync_click) { -- cgit v1.2.1