summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-10-27 12:29:26 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-10-28 10:01:38 +0000
commitf577a01f5e8d9678d268917ca727a6e9a3e819a6 (patch)
tree041e159339ac040c3d61406f3174dd0d1a00396a /src
parent8d9c42e36217e14efa69974c2cdc8d90f465a959 (diff)
eglfs: Cast to EGLNativeDisplayType in EGLDevice backend
When compiling with EGL native types being the Xlib types (uncommon since we disable this both for Mesa and NVIDIA embedded, but can happen with other vendor's headers), the types for EGLDeviceEXT (void*) and EGLNativeDisplayType (Display, i.e. _XDisplay*) won't match, breaking compilation. At runtime we won't hit that path, so all we need to ensure is that the code compiles. Do this via a cast. When the native types are generic, both types are void* so the cast has no effect. Change-Id: Ib54f569d4494906f74107f08b47bd6b521d700db Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp
index 743f714cf0..f6e86bf0bc 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp
@@ -71,7 +71,7 @@ void QEglFSKmsEglDevice::close()
EGLNativeDisplayType QEglFSKmsEglDevice::nativeDisplay() const
{
- return static_cast<QEglFSKmsEglDeviceIntegration *>(m_integration)->eglDevice();
+ return reinterpret_cast<EGLNativeDisplayType>(static_cast<QEglFSKmsEglDeviceIntegration *>(m_integration)->eglDevice());
}
QEglFSKmsScreen *QEglFSKmsEglDevice::createScreen(QEglFSKmsIntegration *integration, QEglFSKmsDevice *device, QEglFSKmsOutput output, QPoint position)