From da1700e01ac47d1c54dcb12ae5f658ce5ce9a5a0 Mon Sep 17 00:00:00 2001 From: SnapperTT <4939563+SnapperTT@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:11:03 +1030 Subject: [PATCH] Fix Raspberry Pi Build - EGL_DISPMANX_WINDOW_T not defined See: https://forum.qt.io/topic/88588/qtbase-compilation-error-with-device-linux-rasp-pi3-g-qeglfskmsgbmwindow-cpp/9 for details of the fix --- src/glcontext_egl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/glcontext_egl.cpp b/src/glcontext_egl.cpp index 46cf504cbb..3d5e32894f 100644 --- a/src/glcontext_egl.cpp +++ b/src/glcontext_egl.cpp @@ -250,6 +250,12 @@ WL_EGL_IMPORT }; # if BX_PLATFORM_RPI + typedef uint32_t DISPMANX_ELEMENT_HANDLE_T; + typedef struct { + DISPMANX_ELEMENT_HANDLE_T element; + int width; /* This is necessary because dispmanx elements are not queriable. */ + int height; + } EGL_DISPMANX_WINDOW_T; static EGL_DISPMANX_WINDOW_T s_dispmanWindow; # endif // BX_PLATFORM_RPI @@ -384,7 +390,7 @@ WL_EGL_IMPORT s_dispmanWindow.element = dispmanElement; s_dispmanWindow.width = _width; s_dispmanWindow.height = _height; - nwh = &s_dispmanWindow; + nwh = (EGLNativeWindowType) &s_dispmanWindow; vc_dispmanx_update_submit_sync(dispmanUpdate); # endif // BX_PLATFORM_ANDROID