From d601d572e88964225f9b94838ff71619509cadfc Mon Sep 17 00:00:00 2001 From: Martin Neudorfer Date: Fri, 31 Oct 2025 14:32:00 +0100 Subject: [PATCH] fix force vsync on vxWorks Targets --- .../platforms/eglfs/api/qeglfsdeviceintegration.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp index 56fda45e905..6bedd82261e 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp @@ -27,6 +27,9 @@ #include #include #endif +#if defined(Q_OS_VXWORKS) +#include +#endif #include #include @@ -270,6 +273,13 @@ void QEglFSDeviceIntegration::waitForVSync(QPlatformSurface *surface) const if (ioctl(framebuffer, FBIO_WAITFORVSYNC, &arg) == -1) qWarning("Could not wait for vsync."); } +#elif defined(Q_OS_VXWORKS) + static const bool forceSync = qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCEVSYNC"); + if (forceSync && framebuffer != -1) { + int arg = 0; + if (ioctl(framebuffer, FB_IOCTL_VSYNC, &arg) == -1) + qWarning("Could not wait for vsync."); + } #endif } -- 2.47.1.windows.1