From 59738485396ba7fbf1cf84c91b2f63485e8b500e Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:11:15 +0200 Subject: [PATCH] fix: `components.Pot` producing wrong result on first value This fixes a regression introduced in https://github.com/mixxxdj/mixxx/pull/4495 and reported as https://github.com/mixxxdj/mixxx/issues/11814 --- res/controllers/midi-components-0.0.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 45fa03a25f8..fc09f01c41a 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -481,8 +481,7 @@ if (this.max === Component.prototype.max) { this.max = (1 << 14) - 1; } - value = (value << 7) + (this._firstLSB ? this._firstLSB : 0); - this.input(channel, control, value, status, group); + this.input(channel, control, (value << 7) + (this._firstLSB ? this._firstLSB : 0), status, group); } this.MSB = value; },