From 237ef3d47f4ed6a9247778e8dcd4e9b81a4f830b Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 6 Sep 2021 23:57:18 +0200 Subject: [PATCH] platforms/drm: fix drmModeSetCursor2 fallback the return value is -errno, not errno. --- src/plugins/platforms/drm/drm_pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/drm/drm_pipeline.cpp b/src/plugins/platforms/drm/drm_pipeline.cpp index 1ca3b79ca7..5d2328a7d7 100644 --- a/src/plugins/platforms/drm/drm_pipeline.cpp +++ b/src/plugins/platforms/drm/drm_pipeline.cpp @@ -314,7 +314,7 @@ bool DrmPipeline::setCursor(const QSharedPointer &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()); }