From 6804a4c820e4c00670103acd7d87d19a91e21cfc Mon Sep 17 00:00:00 2001 From: Ada Date: Mon, 19 May 2025 14:36:45 +1000 Subject: [PATCH] Fix OpenXR plugin building on GCC 11 --- plugins/openxr/src/OpenXrDisplayPlugin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/openxr/src/OpenXrDisplayPlugin.cpp b/plugins/openxr/src/OpenXrDisplayPlugin.cpp index 24448e83a4..ba4d514399 100644 --- a/plugins/openxr/src/OpenXrDisplayPlugin.cpp +++ b/plugins/openxr/src/OpenXrDisplayPlugin.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #if defined(Q_OS_WIN) #undef near @@ -133,8 +133,11 @@ static std::string glFormatStr(GLenum source) { ENUM_TO_STR(GL_RGBA16F); ENUM_TO_STR(GL_SRGB8_ALPHA8); ENUM_TO_STR(GL_RGB10_A2UI); - default: - return std::format("0x{:X}", source); + default: { + std::stringstream stream; + stream << "0x" << std::uppercase << std::hex << source; + return stream.str(); + } } }