From bda8ac3969d40b28c4c14683c1f722647fd17aec Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Tue, 16 Jan 2024 15:21:47 +0100 Subject: Further performance improvements --- src/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 2731b6a..a4d3421 100644 --- a/src/main.c +++ b/src/main.c @@ -71,6 +71,8 @@ WITH REGARD TO THIS SOFTWARE. #define PROF_ENABLE 0 #include "profiling.c" +static int frames = 0; + void render_sequencer(void) { if (redraw_trigs) { @@ -110,11 +112,15 @@ render_sequencer(void) { if (input_handler == handle_pattern_selection || input_handler == handle_pattern_chain) { - draw_pattern_chain(); + if (frames & 0x1) { + draw_pattern_chain(); + } } - draw_notif_bar(); - PROF(draw_piano_notes(), draw_piano_cycles); + if (frames++ & 0x1) { + draw_notif_bar(); + PROF(draw_piano_notes(), draw_piano_cycles); + } PROF(draw_cursors(), draw_cursor_cycles); } -- cgit v1.2.1