From 8354f1a6107a93cc48aca78e5929e332e6379caa Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 2 Feb 2022 04:23:36 -0500 Subject: [PATCH] GUI: slightly tweak volume insertion method untested as i am on bed --- src/gui/gui.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 3b37dcf56..332ffe821 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -4274,8 +4274,12 @@ void FurnaceGUI::keyDown(SDL_Event& ev) { curNibble=!curNibble; if (!curNibble) editAdvance(); } - } else if (cursor.xFine==2) { // volume - pat->data[cursor.y][cursor.xFine+1]&=e->getMaxVolumeChan(cursor.xCoarse); + } else if (cursor.xFine==2) { + 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); if (e->getMaxVolumeChan(cursor.xCoarse)<16) { curNibble=false;