From 216ac6cebd9a4192d94c13ef4665203c9c46d051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:21:39 +0000 Subject: [PATCH] Fixed a bug causing GS levels to get ignored. --- src/basic/index.mjs | 6 ++++++ src/disp/disp_sc8850.mjs | 2 +- src/state/index.mjs | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/basic/index.mjs b/src/basic/index.mjs index c97349f..fc1d3cd 100644 --- a/src/basic/index.mjs +++ b/src/basic/index.mjs @@ -212,6 +212,12 @@ let RootDisplay = class extends CustomEventSource { getChVoice(ch) { return this.device.getChVoice(ch); }; + getChPrimitive(ch, component, useSubDb) { + return this.device.getChPrimitive(ch, component, useSubDb); + }; + getChPrimitives(ch, useSubDb) { + return this.device.getChPrimitives(ch, useSubDb); + }; getMapped(id) { return this.#mapList[id]?.name || id; }; diff --git a/src/disp/disp_sc8850.mjs b/src/disp/disp_sc8850.mjs index a104d78..fe9f02e 100644 --- a/src/disp/disp_sc8850.mjs +++ b/src/disp/disp_sc8850.mjs @@ -503,7 +503,7 @@ let Sc8850Display = class extends RootDisplay { switch (upThis.device.getChMode(upThis.#ch)) { case "gs": case "sc": { - let cc32 = sum.chContr[chOff + ccToPos[32]]; + let cc32 = upThis.getChPrimitive(upThis.#ch, 2, true); if (cc32 > 0 && cc32 < 5) { let cx = 153; let cy = 48 - cc32 * 5; diff --git a/src/state/index.mjs b/src/state/index.mjs index b0bcda6..e1d598d 100644 --- a/src/state/index.mjs +++ b/src/state/index.mjs @@ -1461,6 +1461,9 @@ let OctaviaDevice = class extends CustomEventSource { getSubDb() { return self?.structuredClone(this.#subDb); }; + getDetect() { + return self?.structuredClone(this.#detect); + }; getVoice(msbO, prgO, lsbO, mode = "?") { let upThis = this; if (!modeMap[mode]?.constructor) {