From b8538fa09168c15ada4d8eabdd78775a0c0858a3 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 16 Jan 2022 01:37:16 -0500 Subject: [PATCH] GUI: fix some cases in where curNibble remains 1 --- src/gui/gui.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 27eb0947..706dbb8c 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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; }