GUI: fix some cases in where curNibble remains 1

This commit is contained in:
tildearrow 2022-01-16 01:37:16 -05:00
parent 45b6c19867
commit b8538fa091
1 changed files with 8 additions and 1 deletions

View File

@ -273,6 +273,7 @@ void FurnaceGUI::drawEditControls() {
if (ImGui::Button(ICON_FA_PLAY "##Play")) {
e->play();
curNibble=false;
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_STOP "##Stop")) {
@ -2447,13 +2448,18 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
}
} else switch (ev.key.keysym.sym) {
case SDLK_F5:
if (!e->isPlaying()) e->play();
if (!e->isPlaying()) {
e->play();
curNibble=false;
}
break;
case SDLK_F6:
e->play();
curNibble=false;
break;
case SDLK_F7:
e->play();
curNibble=false;
break;
case SDLK_F8:
e->stop();
@ -2463,6 +2469,7 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
e->stop();
} else {
e->play();
curNibble=false;
}
break;
}