getRedrawInterval
This commit is contained in:
parent
628622427a
commit
b1552db800
|
@ -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();
|
||||
|
|
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue