aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-01-16 15:21:47 +0100
committerBad Diode <bd@badd10de.dev>2024-01-16 15:21:47 +0100
commitbda8ac3969d40b28c4c14683c1f722647fd17aec (patch)
tree17473683aa917a5aced51fc35e8c0866eb00595f /src/main.c
parent950b4268b6283f0eb322ba93b623988abc0d4e96 (diff)
downloadstepper-bda8ac3969d40b28c4c14683c1f722647fd17aec.tar.gz
stepper-bda8ac3969d40b28c4c14683c1f722647fd17aec.zip
Further performance improvements
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 9 insertions, 3 deletions
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.
71#define PROF_ENABLE 0 71#define PROF_ENABLE 0
72#include "profiling.c" 72#include "profiling.c"
73 73
74static int frames = 0;
75
74void 76void
75render_sequencer(void) { 77render_sequencer(void) {
76 if (redraw_trigs) { 78 if (redraw_trigs) {
@@ -110,11 +112,15 @@ render_sequencer(void) {
110 112
111 if (input_handler == handle_pattern_selection || 113 if (input_handler == handle_pattern_selection ||
112 input_handler == handle_pattern_chain) { 114 input_handler == handle_pattern_chain) {
113 draw_pattern_chain(); 115 if (frames & 0x1) {
116 draw_pattern_chain();
117 }
114 } 118 }
115 119
116 draw_notif_bar(); 120 if (frames++ & 0x1) {
117 PROF(draw_piano_notes(), draw_piano_cycles); 121 draw_notif_bar();
122 PROF(draw_piano_notes(), draw_piano_cycles);
123 }
118 PROF(draw_cursors(), draw_cursor_cycles); 124 PROF(draw_cursors(), draw_cursor_cycles);
119} 125}
120 126