Skip to content

Commit

Permalink
Fix numpad effect number input
Browse files Browse the repository at this point in the history
Fixes #48.
  • Loading branch information
Gumball2415 committed Nov 29, 2023
1 parent fb82b8b commit 2f13bd6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/FamiTrackerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2973,9 +2973,6 @@ bool CFamiTrackerView::EditEffNumberColumn(stChanNote &Note, Input input, int Ef
bStepDown = true;
return true;
}

if (key >= VK_NUMPAD0 && key <= VK_NUMPAD9)
key = '0' + (key - VK_NUMPAD0);
}

CFamiTrackerDoc* pDoc = GetDocument();
Expand All @@ -2990,6 +2987,10 @@ bool CFamiTrackerView::EditEffNumberColumn(stChanNote &Note, Input input, int Ef

if (auto p = get_if<Keycode>(&input)) {
auto key = *p;

if (key >= VK_NUMPAD0 && key <= VK_NUMPAD9)
key = '0' + (key - VK_NUMPAD0);

if (!isAlphanumeric(key)) {
return false;
}
Expand Down

0 comments on commit 2f13bd6

Please sign in to comment.