This commit is contained in:
Vincent Wei
2023-07-14 16:32:16 +08:00
parent 56ddd87189
commit c6957bec23
2 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -3720,8 +3720,10 @@ static BOOL DRM_WaitVBlank(_THIS)
(this->hidden->crtc_idx << DRM_VBLANK_HIGH_CRTC_SHIFT);
vbl.request.sequence = 1;
vbl.request.signal = 0;
if (drmWaitVBlank(this->hidden->dev_fd, &vbl))
if (drmWaitVBlank(this->hidden->dev_fd, &vbl)) {
_WRN_PRINTF("Failed drmWaitVBlank: %m\n");
return FALSE;
}
return TRUE;
}
+5 -4
View File
@@ -630,8 +630,11 @@ static void *task_do_update(void *data)
sem_post(&this->hidden->sync_sem);
do {
if (this->WaitVBlank) {
this->WaitVBlank(this);
GAL_VideoDevice *real_device;
real_device = this->hidden->realfb_info->real_device;
if (real_device->WaitVBlank) {
real_device->WaitVBlank(this);
}
else {
usleep(this->hidden->update_interval * 1000);
@@ -678,8 +681,6 @@ static void *task_do_update(void *data)
update_rect.w = RECTW(dirty_rect);
update_rect.h = RECTH(dirty_rect);
GAL_VideoDevice *real_device;
real_device = this->hidden->realfb_info->real_device;
if (real_device->UpdateRects)
real_device->UpdateRects(real_device, 1, &update_rect);
if (real_device->SyncUpdate)