diff --git a/src/GUI.cpp b/src/GUI.cpp index c19d254..4688d11 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -39,6 +39,9 @@ int GUI_run(int argc, char **argv) { vkvm::registerEvent(vkvm::EventType::UpdateControlRegisters, [image, window, status]() { int newRedrawInterval = vkvm::getRedrawInterval(); if(newRedrawInterval != redrawInterval) { + /*if(redrawInterval == -1 && newRedrawInterval != -1) { + refreshCallback(image); + }*/ redrawInterval = newRedrawInterval; } @@ -66,7 +69,10 @@ static void refreshCallback(void * pointer) { auto *image = static_cast(pointer); image->getPixels(); - Fl::repeat_timeout((double) redrawInterval / 1000, redrawCallback, image); + if(redrawInterval != -1) { + Fl::repeat_timeout((double) redrawInterval / 1000, redrawCallback, image); + } + } static void redrawCallback(void * pointer) {