From a7c732367367a5325bb0af2da566965de3e9706e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 19 Feb 2017 13:58:44 +0100 Subject: [PATCH] Platform: make WindowFlag::Resizable consistent between GLFW and SDL2 app. It was Resizeable on GLFW and Resizable on SDL2. As both APIs use "resizable" as the flag name, I'm keeping it. The old enum value is now an alias to the new one, is marked as deprecated and will be removed in a future release. --- src/Magnum/Platform/GlfwApplication.cpp | 2 +- src/Magnum/Platform/GlfwApplication.h | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 65e1d7780..e5ac6e50b 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -82,7 +82,7 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { glfwWindowHint(GLFW_AUTO_ICONIFY, configuration.windowFlags() >= Configuration::WindowFlag::AutoIconify); } else { const Configuration::WindowFlags& flags = configuration.windowFlags(); - glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizeable); + glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizable); glfwWindowHint(GLFW_VISIBLE, !(flags >= Configuration::WindowFlag::Hidden)); #ifdef GLFW_MAXIMIZED glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized); diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index 8613213f5..785ba4199 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -305,7 +305,15 @@ class GlfwApplication::Configuration { */ enum class WindowFlag: UnsignedShort { Fullscreen = 1 << 0, /**< Fullscreen window */ - Resizeable = 1 << 1, /**< Resizeable window */ + Resizable = 1 << 1, /**< Resizable window */ + + #ifdef MAGNUM_BUILD_DEPRECATED + /** @copydoc WindowFlag::Resizable + * @deprecated Use @ref WindowFlag::Resizable instead. + */ + Resizeable CORRADE_DEPRECATED_ENUM("use WindowFlag::Resizable instead") = UnsignedShort(WindowFlag::Resizable), + #endif + Hidden = 1 << 2, /**< Hidden window */ #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_MAXIMIZED)