eglfs: Make KMS hooks compile on older systems

drmModeSetCursor2 has not been available for very long and doesn't
actually buy us much, so don't use it. Also one more missing cast.

Change-Id: I1120b933759bbabf73edd23bfc837a2a27a93a0c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Louai Al-Khanji 2014-10-17 11:45:02 +03:00 committed by Laszlo Agocs
parent 4f1de1432c
commit d63e012fcd
1 changed files with 2 additions and 3 deletions

View File

@ -412,8 +412,7 @@ void QEglFSKmsCursor::changeCursor(QCursor *windowCursor, QWindow *window)
gbm_bo_write(m_bo, cursorImage.constBits(), cursorImage.byteCount());
uint32_t handle = gbm_bo_get_handle(m_bo).u32;
QPoint hot = m_cursorImage.hotspot();
int status = drmModeSetCursor2(m_screen->device()->fd(), m_screen->output().crtc_id, handle, 64, 64, hot.x(), hot.y());
int status = drmModeSetCursor(m_screen->device()->fd(), m_screen->output().crtc_id, handle, 64, 64);
if (status != 0)
qWarning("Could not set cursor: %d", status);
}
@ -515,7 +514,7 @@ QEglFSKmsScreen::FrameBuffer *QEglFSKmsScreen::framebufferForBufferObject(gbm_bo
}
QEglFSKmsScreen::QEglFSKmsScreen(QEglFSKmsDevice *device, QEglFSKmsOutput output, QPoint position)
: QEglFSScreen(eglGetDisplay(device->device()))
: QEglFSScreen(eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(device->device())))
, m_device(device)
, m_gbm_surface(Q_NULLPTR)
, m_gbm_bo_current(Q_NULLPTR)