GUI: slightly tweak volume insertion method

untested as i am on bed
This commit is contained in:
tildearrow 2022-02-02 04:23:36 -05:00
parent dc16d52a7c
commit 8354f1a610

View file

@ -4274,8 +4274,12 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
curNibble=!curNibble; curNibble=!curNibble;
if (!curNibble) editAdvance(); if (!curNibble) editAdvance();
} }
} else if (cursor.xFine==2) { // volume } else if (cursor.xFine==2) {
pat->data[cursor.y][cursor.xFine+1]&=e->getMaxVolumeChan(cursor.xCoarse); if (curNibble) {
if (pat->data[cursor.y][cursor.xFine+1]>e->getMaxVolumeChan(cursor.xCoarse)) pat->data[cursor.y][cursor.xFine+1]=e->getMaxVolumeChan(cursor.xCoarse);
} else {
pat->data[cursor.y][cursor.xFine+1]&=15;
}
makeUndo(GUI_ACTION_PATTERN_EDIT); makeUndo(GUI_ACTION_PATTERN_EDIT);
if (e->getMaxVolumeChan(cursor.xCoarse)<16) { if (e->getMaxVolumeChan(cursor.xCoarse)<16) {
curNibble=false; curNibble=false;