mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 17:57:26 +00:00
Fixing the fix.
This checks for both values being set to zero (their freshly-initialized state, which shouldn't happen in normal use) and sets them to proper defaults if so. Otherwise, it uses what was already there.
This commit is contained in:
parent
4a9bf44b56
commit
ab76546f7a
1 changed files with 4 additions and 0 deletions
|
@ -1767,6 +1767,10 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail
|
|||
\
|
||||
/* if ADSR/LFO, populate min/max */ \
|
||||
if (i.macro->open&6) { \
|
||||
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]=(i.macro->val[0]<i.min ? i.min : (i.macro->val[0]>i.max ? i.max : i.macro->val[0])); \
|
||||
i.macro->val[1]=(i.macro->val[1]<i.min ? i.min : (i.macro->val[1]>i.max ? i.max : i.macro->val[1])); \
|
||||
} \
|
||||
|
|
Loading…
Reference in a new issue