diff options
author | Bad Diode <bd@badd10de.dev> | 2023-05-28 09:27:03 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-05-28 09:27:03 +0200 |
commit | af68ac1e1bb77fd821e042d2c8ea9a159c970d20 (patch) | |
tree | dbe9ed56d0a846c1c79db3c39e9e6f9655be6821 /src | |
parent | aa3db2f8c3af8163a707a87cd946c2a30070ced4 (diff) | |
download | stepper-af68ac1e1bb77fd821e042d2c8ea9a159c970d20.tar.gz stepper-af68ac1e1bb77fd821e042d2c8ea9a159c970d20.zip |
Fix bug for pattern chaining
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/sequencer.c | 2 |
2 files changed, 3 insertions, 6 deletions
@@ -41,9 +41,9 @@ WITH REGARD TO THIS SOFTWARE. | |||
41 | // | 41 | // |
42 | // Bugfixes | 42 | // Bugfixes |
43 | // - Sound can get hung up sometimes, but I can't reproduce when this happens. | 43 | // - Sound can get hung up sometimes, but I can't reproduce when this happens. |
44 | // Not sure if this is an emulator thing or happens also in hardware. | 44 | // Not sure if this is an emulator thing or happens also in hardware. |
45 | // - Cursor can stay in position instead of dissapering, again I can't | 45 | // - Cursor can stay in position instead of dissapering, again I can't |
46 | // reproduce this right now, just happened randomly. Needs investigation. | 46 | // reproduce this right now, just happened randomly. Needs investigation. |
47 | // | 47 | // |
48 | 48 | ||
49 | #include "gba/gba.h" | 49 | #include "gba/gba.h" |
@@ -112,9 +112,6 @@ main(void) { | |||
112 | // Adjust system wait times. | 112 | // Adjust system wait times. |
113 | SYSTEM_WAIT = SYSTEM_WAIT_CARTRIDGE; | 113 | SYSTEM_WAIT = SYSTEM_WAIT_CARTRIDGE; |
114 | 114 | ||
115 | // Initialize filesystem. | ||
116 | fs_init(); | ||
117 | |||
118 | // Initialize renderer. | 115 | // Initialize renderer. |
119 | renderer_init(); | 116 | renderer_init(); |
120 | 117 | ||
diff --git a/src/sequencer.c b/src/sequencer.c index 65a2f46..6aa8eea 100644 --- a/src/sequencer.c +++ b/src/sequencer.c | |||
@@ -21,12 +21,12 @@ bool update_bpm = false; | |||
21 | 21 | ||
22 | void | 22 | void |
23 | play_step(void) { | 23 | play_step(void) { |
24 | Pattern *pat = &patterns[current_pattern]; | ||
24 | if (current_pattern != next_pattern && step_counter == 15) { | 25 | if (current_pattern != next_pattern && step_counter == 15) { |
25 | current_pattern = next_pattern; | 26 | current_pattern = next_pattern; |
26 | redraw_pattern_buttons = true; | 27 | redraw_pattern_buttons = true; |
27 | update_bpm = true; | 28 | update_bpm = true; |
28 | } | 29 | } |
29 | Pattern *pat = &patterns[current_pattern]; | ||
30 | if (pat->ch1.active) { | 30 | if (pat->ch1.active) { |
31 | TriggerNote *trig = &pat->ch1.notes[step_counter]; | 31 | TriggerNote *trig = &pat->ch1.notes[step_counter]; |
32 | ChannelSquareParams *params = &pat->ch1.params[step_counter]; | 32 | ChannelSquareParams *params = &pat->ch1.params[step_counter]; |