fix: remove duplicate engine implementation and unused GUI code
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
12
gui.c
12
gui.c
@@ -81,16 +81,12 @@ static void gui_update(void)
|
||||
/* BPM slider */
|
||||
mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);
|
||||
mu_label(ctx, "BPM:");
|
||||
if (mu_slider(ctx, &bpm, 20.0f, 300.0f, 0, "%.0f", 0)) {
|
||||
engine_set_bpm(g_engine, bpm);
|
||||
}
|
||||
mu_slider(ctx, &bpm, 20.0f, 300.0f, 0, "%.0f", 0);
|
||||
|
||||
/* loop length */
|
||||
mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);
|
||||
mu_label(ctx, "Length:");
|
||||
if (mu_slider(ctx, (float*)&loop_length, 1.0f, 64.0f, 0, "%.0f", 0)) {
|
||||
engine_set_loop_length(g_engine, loop_length);
|
||||
}
|
||||
mu_slider(ctx, (float*)&loop_length, 1.0f, 64.0f, 0, "%.0f", 0);
|
||||
|
||||
/* beat indicator */
|
||||
mu_layout_row(ctx, 1, (int[]) { -1 }, 0);
|
||||
@@ -162,19 +158,15 @@ int gui_main(Engine *engine)
|
||||
break;
|
||||
case KEY_UP:
|
||||
bpm = fminf(bpm + 5.0f, 300.0f);
|
||||
engine_set_bpm(g_engine, bpm);
|
||||
break;
|
||||
case KEY_DOWN:
|
||||
bpm = fmaxf(bpm - 5.0f, 20.0f);
|
||||
engine_set_bpm(g_engine, bpm);
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
loop_length = (loop_length > 1) ? loop_length - 1 : 1;
|
||||
engine_set_loop_length(g_engine, loop_length);
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
loop_length = (loop_length < 64) ? loop_length + 1 : 64;
|
||||
engine_set_loop_length(g_engine, loop_length);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user