From c85c6d6fc58fe2524c38871ea1955fdb899c6289 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao Date: Thu, 17 Aug 2023 11:58:00 +0800 Subject: [PATCH] fix qt5 build --- src/core/utils.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/utils.cpp b/src/core/utils.cpp index 9388ec92..7578be1a 100644 --- a/src/core/utils.cpp +++ b/src/core/utils.cpp @@ -599,14 +599,16 @@ bool Utils::isWindowAccelerated(const QWindow *window) switch (window->surfaceType()) { case QSurface::RasterGLSurface: #ifdef FRAMELESSHELPER_CORE_NO_PRIVATE - return false; -#else + return true; +#else // !FRAMELESSHELPER_CORE_NO_PRIVATE return qt_window_private(const_cast(window))->compositing; -#endif +#endif // FRAMELESSHELPER_CORE_NO_PRIVATE case QSurface::OpenGLSurface: case QSurface::VulkanSurface: case QSurface::MetalSurface: +#if (QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)) case QSurface::Direct3DSurface: +#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)) return true; default: break;