From 89726c5b3227507baf1fefbc5cdce1eaba11732b Mon Sep 17 00:00:00 2001 From: Lu Zhen Date: Mon, 28 Apr 2025 15:28:36 +0800 Subject: [PATCH] fix: crashed when open plugin detail page Log: Bug: https://pms.uniontech.com/bug-view-314807.html Change-Id: Ica69be9473023d282fb3e3ed5b09e2188d61d65e --- src/app/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 49f1ea959..2657bfad7 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -4,6 +4,7 @@ #include "common/common.h" #include "common/settings/settings.h" +#include "common/util/utils.h" #include #include @@ -103,10 +104,12 @@ void openProject(const QString &path) int main(int argc, char *argv[]) { // some platform opengl drive with wrong,so use OpenGLES instead. - if (QSysInfo::currentCpuArchitecture().contains("arm")) { - QSurfaceFormat format; - format.setRenderableType(QSurfaceFormat::OpenGLES); - format.setDefaultFormat(format); + if(utils::isWayland()) { + if (QSysInfo::currentCpuArchitecture().contains("arm")) { + QSurfaceFormat format; + format.setRenderableType(QSurfaceFormat::OpenGLES); + format.setDefaultFormat(format); + } } QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);