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>
bb10
Laszlo Agocs 2016-10-27 12:29:26 +02:00
parent 8d9c42e362
commit f577a01f5e
1 changed files with 1 additions and 1 deletions

View File

@ -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)