aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c54
1 files changed, 48 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 6f1d0e6..cec540e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -48,6 +48,9 @@ WITH REGARD TO THIS SOFTWARE.
48 48
49#include "gba/gba.h" 49#include "gba/gba.h"
50 50
51#define PROF_ENABLE 0
52#include "profiling.c"
53
51#include "renderer_m0.c" 54#include "renderer_m0.c"
52#include "globals.c" 55#include "globals.c"
53#include "assets.c" 56#include "assets.c"
@@ -57,9 +60,6 @@ WITH REGARD TO THIS SOFTWARE.
57#include "scale.c" 60#include "scale.c"
58#include "sequencer.c" 61#include "sequencer.c"
59 62
60#define PROF_ENABLE 0
61#include "profiling.c"
62
63static int frames = 0; 63static int frames = 0;
64 64
65void 65void
@@ -191,10 +191,52 @@ render(void) {
191 191
192void 192void
193handle_input(void) { 193handle_input(void) {
194 if (key_tap(KEY_SELECT) && key_hold(KEY_START)) { 194#if PROF_ENABLE > 0
195 PROF_SHOW(); 195 if (key_hold(KEY_SELECT)) {
196 clear_screen = true; 196 if (key_tap(KEY_DOWN)) {
197 PROF_SHOW();
198 clear_screen = true;
199 redraw_trigs = true;
200 redraw_channels = true;
201 redraw_pattern_buttons = true;
202 redraw_bank_buttons = true;
203 redraw_bpm = true;
204 redraw_play_pause = true;
205 redraw_params = true;
206 redraw_scale = true;
207 return;
208 }
209 static int prof_detail = 0;
210 if (key_tap(KEY_RIGHT)) {
211 prof_detail = CLAMP(prof_detail + 1, 0, 3);
212 PROF_DETAIL(prof_detail);
213 clear_screen = true;
214 redraw_trigs = true;
215 redraw_channels = true;
216 redraw_pattern_buttons = true;
217 redraw_bank_buttons = true;
218 redraw_bpm = true;
219 redraw_play_pause = true;
220 redraw_params = true;
221 redraw_scale = true;
222 return;
223 }
224 if (key_tap(KEY_LEFT)) {
225 prof_detail = CLAMP(prof_detail - 1, 0, 3);
226 PROF_DETAIL(prof_detail);
227 clear_screen = true;
228 redraw_trigs = true;
229 redraw_channels = true;
230 redraw_pattern_buttons = true;
231 redraw_bank_buttons = true;
232 redraw_bpm = true;
233 redraw_play_pause = true;
234 redraw_params = true;
235 redraw_scale = true;
236 return;
237 }
197 } 238 }
239#endif
198 switch (scene) { 240 switch (scene) {
199 case SCENE_SETTINGS: { 241 case SCENE_SETTINGS: {
200 handle_settings_input(); 242 handle_settings_input();