summaryrefslogtreecommitdiff
path: root/audio/guitarix/patches/0001-fix-Issue-switching-presets-with-midi-messages-repor.patch
blob: 7f7ad8fc3f711018331766ce1c0390fceb0ea9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From c929d5872b81214e7aef3fc82bc178b427dc30f8 Mon Sep 17 00:00:00 2001
From: Hermann Meyer <brummer-@web.de>
Date: Mon, 9 Nov 2015 06:57:27 +0100
Subject: [PATCH 1/3]  * fix Issue switching presets with midi messages
 reported by eduardomezencio

---
 trunk/src/gx_head/engine/gx_paramtable.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/trunk/src/gx_head/engine/gx_paramtable.cpp b/trunk/src/gx_head/engine/gx_paramtable.cpp
index b82fe93..4ef2851 100644
--- a/trunk/src/gx_head/engine/gx_paramtable.cpp
+++ b/trunk/src/gx_head/engine/gx_paramtable.cpp
@@ -505,7 +505,7 @@ void MidiControllerList::on_pgm_chg() {
     do {
 	pgm = gx_system::atomic_get(program_change);
     } while (!gx_system::atomic_compare_and_exchange(&program_change, pgm, -1));
-    new_program(pgm);
+    if (pgm>=0) new_program(pgm);
 }
 
 void MidiControllerList::on_mute_chg() {
@@ -521,7 +521,7 @@ void MidiControllerList::on_bank_chg() {
     do {
 	bk = gx_system::atomic_get(bank_change);
     } while (!gx_system::atomic_compare_and_exchange(&bank_change, bk, -1));
-    new_bank(bk);
+    if (bk>=0) new_bank(bk);
 }
 
 void MidiControllerList::set_config_mode(bool mode, int ctl) {
-- 
1.8.4