Make it possible to set the EGL_DEFAULT_DISPLAY

Change-Id: I564f1ce72501bc12b960c87c953343fd64ee9011
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Andy Nichols 2020-02-14 17:33:44 +01:00 committed by Norihito Tohge
parent ef5c747aba
commit 20f7e18d9c

View File

@ -185,7 +185,9 @@ void QEglFSDeviceIntegration::platformDestroy()
EGLNativeDisplayType QEglFSDeviceIntegration::platformDisplay() const
{
return EGL_DEFAULT_DISPLAY;
bool displayOk;
const int defaultDisplay = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DEFAULT_DISPLAY", &displayOk);
return displayOk ? EGLNativeDisplayType(quintptr(defaultDisplay)) : EGL_DEFAULT_DISPLAY;
}
EGLDisplay QEglFSDeviceIntegration::createDisplay(EGLNativeDisplayType nativeDisplay)