From 881364f0a041c9d17a1281cba76f5c71718c83de Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Wed, 8 Nov 2023 19:32:50 +0100 Subject: [PATCH] Issue #106: Warning - Hardware acceleration is not supported on this device --- Pdf4QtLib/sources/pdfrenderer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Pdf4QtLib/sources/pdfrenderer.cpp b/Pdf4QtLib/sources/pdfrenderer.cpp index cf64e44..22c878e 100644 --- a/Pdf4QtLib/sources/pdfrenderer.cpp +++ b/Pdf4QtLib/sources/pdfrenderer.cpp @@ -996,6 +996,14 @@ const PDFRendererInfo::Info& PDFRendererInfo::getHardwareAccelerationSupportedIn context.doneCurrent(); surface.destroy(); + versionString = versionString.trimmed(); + + int spaceIndex = versionString.indexOf(QChar(QChar::Space)); + if (spaceIndex != -1) + { + versionString = versionString.left(spaceIndex); + } + info.vendor = vendorString; info.renderer = rendererString; info.version = versionString;