diff --git a/main/gui/source/window/window.cpp b/main/gui/source/window/window.cpp index 1543b9d3e..36cc6f897 100644 --- a/main/gui/source/window/window.cpp +++ b/main/gui/source/window/window.cpp @@ -1045,11 +1045,14 @@ namespace hex { // Wayland auto-maximizes windows that take up 80% or more of the monitor size // Limit the size to take up slightly less than that at max - if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) { - const static auto SizeMultiplier = sqrt(0.79); - maxWindowCreationWidth *= SizeMultiplier; - maxWindowCreationHeight *= SizeMultiplier; - } + // glfwGetPlatform() is only available since GLFW 3.4 + #if GLFW_VERSION_MAJOR >= 3 || (GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4) + if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) { + const static auto SizeMultiplier = sqrt(0.79); + maxWindowCreationWidth *= SizeMultiplier; + maxWindowCreationHeight *= SizeMultiplier; + } + #endif maxWindowCreationWidth -= 50_scaled; maxWindowCreationHeight -= 50_scaled;