Fix OpenXR plugin building on GCC 11

This commit is contained in:
Ada 2025-05-19 14:36:45 +10:00
parent 0947f57911
commit 6804a4c820

View File

@ -16,7 +16,7 @@
#include <glm/gtx/string_cast.hpp> #include <glm/gtx/string_cast.hpp>
#include <glm/gtx/transform.hpp> #include <glm/gtx/transform.hpp>
#include <thread> #include <thread>
#include <format> #include <sstream>
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
#undef near #undef near
@ -133,8 +133,11 @@ static std::string glFormatStr(GLenum source) {
ENUM_TO_STR(GL_RGBA16F); ENUM_TO_STR(GL_RGBA16F);
ENUM_TO_STR(GL_SRGB8_ALPHA8); ENUM_TO_STR(GL_SRGB8_ALPHA8);
ENUM_TO_STR(GL_RGB10_A2UI); ENUM_TO_STR(GL_RGB10_A2UI);
default: default: {
return std::format("0x{:X}", source); std::stringstream stream;
stream << "0x" << std::uppercase << std::hex << source;
return stream.str();
}
} }
} }