From 97f5cdd0b88a81c4f42a420d6a6a1d89e4d12a81e6987d7eefb0c7313c761703 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 17 May 2024 06:04:20 +0000 Subject: [PATCH] - Add 0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/schismtracker?expand=0&rev=73 --- ...for-Instrument-Mode-when-handling-No.patch | 27 +++++++++++++++++++ schismtracker.changes | 5 ++++ schismtracker.spec | 1 + 3 files changed, 33 insertions(+) create mode 100644 0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch diff --git a/0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch b/0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch new file mode 100644 index 0000000..bc7b8e6 --- /dev/null +++ b/0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch @@ -0,0 +1,27 @@ +From 943993a1c038c43dd9c3c326fe9f981eeb6c4fcf Mon Sep 17 00:00:00 2001 +From: Paper +Date: Thu, 16 May 2024 22:23:16 -0400 +Subject: [PATCH] player/fx: check for Instrument Mode when handling + NoMapEffects.it + +Fixes #437. Simple fix, annoying though :) +--- + player/effects.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/player/effects.c b/player/effects.c +index 814fff29..31c5239e 100644 +--- a/player/effects.c ++++ b/player/effects.c +@@ -2153,7 +2153,7 @@ void csf_process_effects(song_t *csf, int firsttick) + // This is probably the single biggest WTF replayer bug in Impulse Tracker. + // In instrument mode, when an note + instrument is triggered that does not map to any sample, the entire cell (including potentially present global effects!) + // is ignored. Even better, if on a following row another instrument number (this time without a note) is encountered, we end up in the same situation! +- if (instr > 0 && instr < MAX_INSTRUMENTS && csf->instruments[instr] != NULL) ++ if (csf->flags & SONG_INSTRUMENTMODE && instr > 0 && instr < MAX_INSTRUMENTS && csf->instruments[instr] != NULL) + { + uint8_t note = (chan->row_note != NOTE_NONE) ? chan->row_note : chan->new_note; + if (NOTE_IS_NOTE(note) && csf->instruments[instr]->sample_map[note - NOTE_FIRST] == 0) +-- +2.45.0 + diff --git a/schismtracker.changes b/schismtracker.changes index 151af25..bb3b00a 100644 --- a/schismtracker.changes +++ b/schismtracker.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 17 05:57:18 UTC 2024 - Jan Engelhardt + +- Add 0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch + ------------------------------------------------------------------- Thu May 16 06:14:41 UTC 2024 - Jan Engelhardt diff --git a/schismtracker.spec b/schismtracker.spec index 68bf42e..fcecf7b 100644 --- a/schismtracker.spec +++ b/schismtracker.spec @@ -28,6 +28,7 @@ Source2: %name.desktop Patch1: schism-alsa.diff Patch2: schism-nodate.diff Patch3: schism-deptrack.diff +Patch4: 0001-player-fx-check-for-Instrument-Mode-when-handling-No.patch BuildRequires: alsa-devel BuildRequires: autoconf BuildRequires: automake