mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
GUI: clamp waves to max value
This commit is contained in:
parent
ab3884e5aa
commit
cb3c4e2302
1 changed files with 1 additions and 0 deletions
|
@ -1885,6 +1885,7 @@ void FurnaceGUI::drawWaveEdit() {
|
||||||
modified=true;
|
modified=true;
|
||||||
}
|
}
|
||||||
for (int i=0; i<wave->len; i++) {
|
for (int i=0; i<wave->len; i++) {
|
||||||
|
if (wave->data[i]>wave->max) wave->data[i]=wave->max;
|
||||||
wavePreview[i]=wave->data[i];
|
wavePreview[i]=wave->data[i];
|
||||||
}
|
}
|
||||||
if (wave->len>0) wavePreview[wave->len]=wave->data[wave->len-1];
|
if (wave->len>0) wavePreview[wave->len]=wave->data[wave->len-1];
|
||||||
|
|
Loading…
Reference in a new issue