getRedrawInterval

This commit is contained in:
chenhuan 2019-12-10 22:42:07 +01:00
parent 628622427a
commit b1552db800
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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++) {