diff --git a/src/newgal/drm/drmvideo.c b/src/newgal/drm/drmvideo.c index 52c3e8dc..94053a96 100644 --- a/src/newgal/drm/drmvideo.c +++ b/src/newgal/drm/drmvideo.c @@ -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; } diff --git a/src/newgal/shadow/shadow.c b/src/newgal/shadow/shadow.c index 260784ff..f7bc0bad 100644 --- a/src/newgal/shadow/shadow.c +++ b/src/newgal/shadow/shadow.c @@ -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)