Add VxWorks support in QEglFSDeviceIntegration
Fixes: QTBUG-115777 Change-Id: Ic2f860c259e42b3d4670fe85b3a069c84be5c1da Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io> Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
This commit is contained in:
parent
60c2d72d96
commit
05e5d18393
@ -65,7 +65,7 @@ static int framebuffer = -1;
|
|||||||
|
|
||||||
QByteArray QEglFSDeviceIntegration::fbDeviceName() const
|
QByteArray QEglFSDeviceIntegration::fbDeviceName() const
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#if defined(Q_OS_LINUX) || defined(Q_OS_VXWORKS)
|
||||||
QByteArray fbDev = qgetenv("QT_QPA_EGLFS_FB");
|
QByteArray fbDev = qgetenv("QT_QPA_EGLFS_FB");
|
||||||
if (fbDev.isEmpty())
|
if (fbDev.isEmpty())
|
||||||
fbDev = QByteArrayLiteral("/dev/fb0");
|
fbDev = QByteArrayLiteral("/dev/fb0");
|
||||||
@ -95,7 +95,7 @@ int QEglFSDeviceIntegration::framebufferIndex() const
|
|||||||
|
|
||||||
void QEglFSDeviceIntegration::platformInit()
|
void QEglFSDeviceIntegration::platformInit()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#if defined(Q_OS_LINUX) || defined(Q_OS_VXWORKS)
|
||||||
QByteArray fbDev = fbDeviceName();
|
QByteArray fbDev = fbDeviceName();
|
||||||
|
|
||||||
framebuffer = qt_safe_open(fbDev, O_RDONLY);
|
framebuffer = qt_safe_open(fbDev, O_RDONLY);
|
||||||
@ -113,7 +113,7 @@ void QEglFSDeviceIntegration::platformInit()
|
|||||||
|
|
||||||
void QEglFSDeviceIntegration::platformDestroy()
|
void QEglFSDeviceIntegration::platformDestroy()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#if defined(Q_OS_LINUX) || defined(Q_OS_VXWORKS)
|
||||||
if (framebuffer != -1)
|
if (framebuffer != -1)
|
||||||
close(framebuffer);
|
close(framebuffer);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user