GUI: possibly fix out-of-range notes in preview
now they should release
This commit is contained in:
parent
cccf90d417
commit
cb107ebbac
|
@ -730,6 +730,8 @@ void FurnaceGUI::stopPreviewNote(SDL_Scancode scancode) {
|
||||||
try {
|
try {
|
||||||
int key=noteKeys.at(scancode);
|
int key=noteKeys.at(scancode);
|
||||||
int num=12*curOctave+key;
|
int num=12*curOctave+key;
|
||||||
|
if (num<-60) num=-60; // C-(-5)
|
||||||
|
if (num>119) num=119; // B-9
|
||||||
|
|
||||||
if (key==100) return;
|
if (key==100) return;
|
||||||
if (key==101) return;
|
if (key==101) return;
|
||||||
|
|
Loading…
Reference in a new issue