GUI: fix wave creation

This commit is contained in:
tildearrow 2023-12-09 22:16:58 -05:00
parent 0dd4481307
commit a540de4570
2 changed files with 6 additions and 0 deletions

View file

@ -751,6 +751,9 @@ void FurnaceGUI::doAction(int what) {
wantScrollList=true;
e->song.wave[curWave]->len=finalWidth;
e->song.wave[curWave]->max=finalHeight-1;
for (int j=0; j<finalWidth; j++) {
e->song.wave[curWave]->data[j]=(j*finalHeight)/finalWidth;
}
MARK_MODIFIED;
RESET_WAVE_MACRO_ZOOM;
}

View file

@ -5977,6 +5977,9 @@ bool FurnaceGUI::loop() {
} else {
e->song.wave[curWave]->len=i.width;
e->song.wave[curWave]->max=i.height-1;
for (int j=0; j<i.width; j++) {
e->song.wave[curWave]->data[j]=(j*i.height)/i.width;
}
MARK_MODIFIED;
RESET_WAVE_MACRO_ZOOM;
}