Merge pull request #1403 from tildearrow/macro-values-fix

Fix macro mode changes resetting Bottom and Top.
This commit is contained in:
tildearrow 2023-08-24 04:32:17 -05:00 committed by GitHub
commit d4e60e0c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1767,8 +1767,12 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail
\
/* if ADSR/LFO, populate min/max */ \
if (i.macro->open&6) { \
i.macro->val[0]=i.min; \
i.macro->val[1]=i.max; \
if (i.macro->val[0]==0 && i.macro->val[1]==0) { \
i.macro->val[0]=i.min; \
i.macro->val[1]=i.max; \
} \
i.macro->val[0]=CLAMP(i.macro->val[0],i.min,i.max); \
i.macro->val[1]=CLAMP(i.macro->val[1],i.min,i.max); \
} \
} \
PARAMETER; \