~ trying to update refresh rate
This commit is contained in:
parent
b6c91e8373
commit
d8ea12e567
@ -39,6 +39,9 @@ int GUI_run(int argc, char **argv) {
|
|||||||
vkvm::registerEvent(vkvm::EventType::UpdateControlRegisters, [image, window, status]() {
|
vkvm::registerEvent(vkvm::EventType::UpdateControlRegisters, [image, window, status]() {
|
||||||
int newRedrawInterval = vkvm::getRedrawInterval();
|
int newRedrawInterval = vkvm::getRedrawInterval();
|
||||||
if(newRedrawInterval != redrawInterval) {
|
if(newRedrawInterval != redrawInterval) {
|
||||||
|
/*if(redrawInterval == -1 && newRedrawInterval != -1) {
|
||||||
|
refreshCallback(image);
|
||||||
|
}*/
|
||||||
redrawInterval = newRedrawInterval;
|
redrawInterval = newRedrawInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +69,10 @@ static void refreshCallback(void * pointer) {
|
|||||||
auto *image = static_cast<Image*>(pointer);
|
auto *image = static_cast<Image*>(pointer);
|
||||||
image->getPixels();
|
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) {
|
static void redrawCallback(void * pointer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user