Explorar o código

fix instrument loading (reset instrument before loading)

LTVA1 %!s(int64=2) %!d(string=hai) anos
pai
achega
651f3d9cca
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      diskop.c

+ 2 - 0
diskop.c

@@ -167,6 +167,8 @@ bool load_song_util(FlizzerTrackerApp* tracker, FuriString* filepath) {
 }
 
 bool load_instrument_disk(TrackerSong* song, uint8_t inst, Stream* stream) {
+    set_default_instrument(song->instrument[inst]);
+
     char header[sizeof(INST_FILE_SIG) + 2] = {0};
     size_t rwops = stream_read(stream, (uint8_t*)&header, sizeof(INST_FILE_SIG) - 1);
     header[sizeof(INST_FILE_SIG)] = '\0';