platforms/drm: fix drmModeSetCursor2 fallback
the return value is -errno, not errno.
This commit is contained in:
parent
d63b06d7a5
commit
237ef3d47f
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,7 @@ bool DrmPipeline::setCursor(const QSharedPointer<DrmDumbBuffer> &buffer, const Q
|
|||
}
|
||||
const QSize &s = buffer ? buffer->size() : QSize(64, 64);
|
||||
int ret = drmModeSetCursor2(m_gpu->fd(), m_crtc->id(), buffer ? buffer->handle() : 0, s.width(), s.height(), hotspot.x(), hotspot.y());
|
||||
if (ret == ENOTSUP) {
|
||||
if (ret == -ENOTSUP) {
|
||||
// for NVIDIA case that does not support drmModeSetCursor2
|
||||
ret = drmModeSetCursor(m_gpu->fd(), m_crtc->id(), buffer ? buffer->handle() : 0, s.width(), s.height());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue