diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 10da11f29..59c8787fe 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -534,6 +534,7 @@ Vector2i GlfwApplication::windowSize() const { return size; } +#if (GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302) void GlfwApplication::setMinWindowSize(const Vector2i& size) { CORRADE_ASSERT(_window, "Platform::GlfwApplication::setMinWindowSize(): no window opened", ); @@ -547,6 +548,7 @@ void GlfwApplication::setMaxWindowSize(const Vector2i& size) { glfwSetWindowSizeLimits(_window, _minWindowSize.x(), _minWindowSize.y(), size.x(), size.y()); _maxWindowSize = size; } +#endif #ifdef MAGNUM_TARGET_GL Vector2i GlfwApplication::framebufferSize() const { diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index 5ca0b579c..e82c3e899 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -336,11 +336,14 @@ class GlfwApplication { */ Vector2i windowSize() const; + #if (GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302) || defined(DOXYGEN_GENERATING_OUTPUT) /** * @brief Set window minimum size * @param size The minimum size, in screen coordinates. * * If a value is set to -1, it will disable/remove the corresponding limit. + * + * @note Supported since GLFW 3.2. */ void setMinWindowSize(const Vector2i& size = {-1, -1}); @@ -349,8 +352,11 @@ class GlfwApplication { * @param size The maximum size, in screen coordinates. * * If a value is set to -1, it will disable/remove the corresponding limit. + * + * @note Supported since GLFW 3.2. */ void setMaxWindowSize(const Vector2i& size = {-1, -1}); + #endif #if defined(MAGNUM_TARGET_GL) || defined(DOXYGEN_GENERATING_OUTPUT) /**