From b1552db8000adaa2bb6285a3927f991c18e455c1 Mon Sep 17 00:00:00 2001 From: chenhuan Date: Tue, 10 Dec 2019 22:42:07 +0100 Subject: [PATCH] getRedrawInterval --- src/GUI.cpp | 2 +- src/Image.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index c8260c4..ccb838c 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -25,7 +25,7 @@ auto GUI_run(int argc, char **argv) -> int { redraw(image); }); vkvm::registerEvent(vkvm::EventType::UpdateControlRegisters, [image]() { - image->setDelay(vkvm::getTimerInterruptInterval()); + image->setDelay(vkvm::getRedrawInterval(); }); Fl::repeat_timeout(image->getDelay(), get_new_image, image); window->end(); diff --git a/src/Image.cpp b/src/Image.cpp index 1e5ec56..bee2edc 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -13,7 +13,7 @@ auto Image::draw() -> void { Image::Image(int x, int y, int w, int h) : Fl_Widget(x, y, w, h, nullptr) { buf = new uchar[w * h * 3]; - delay = ((double)vkvm::getTimerInterruptInterval())/1000; + delay = ((double)vkvm::getRedrawInterval())/1000; /*Just an example.*/ for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) {