1
0
mirror of synced 2025-02-17 18:59:21 +01:00

impr: Discard wayland platform errors

This commit is contained in:
WerWolv 2024-01-30 00:47:02 +01:00
parent 62978e5d34
commit 0cba735eb3

View File

@ -388,6 +388,13 @@ namespace hex::init {
void WindowSplash::initGLFW() {
glfwSetErrorCallback([](int errorCode, const char *desc) {
if (errorCode == GLFW_PLATFORM_ERROR) {
// Ignore error spam caused by Wayland not supporting moving or resizing
// windows or querying their position and size.
if (std::string_view(desc).contains("Wayland"))
return;
}
lastGlfwError.errorCode = errorCode;
lastGlfwError.desc = std::string(desc);
log::error("GLFW Error [{}] : {}", errorCode, desc);