Skip to content

Commit

Permalink
Fixed peak keeping to loop in type 3 in SC-8860.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Oct 20, 2024
1 parent fee23f3 commit 88d65b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/disp/disp_sc8850.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,15 @@ let Sc8850Display = class extends RootDisplay {
if (scConf.peakHold == 3 && upThis.#lingerPress[i]) {
upThis.#lingerPress[i] --;
upThis.#lingerExtra[i] = 127;
if (e < upThis.#linger[i]) {
if (e != upThis.#linger[i]) {
upThis.#linger[i] = e;
};
};
if (e > upThis.#linger[i]) {
upThis.#linger[i] = e;
upThis.#lingerExtra[i] = 127;
if (scConf.peakHold != 3 && upThis.#lingerPress[i]) {
upThis.#linger[i] = e;
upThis.#lingerExtra[i] = 127;
};
} else {
let shouldKeep = upThis.#lingerExtra[i] >> 4;
if (shouldKeep) {
Expand Down

0 comments on commit 88d65b4

Please sign in to comment.