Browse Source

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.
pull/193/head
Vladimír Vondruš 9 years ago
parent
commit
a7c7323673
  1. 2
      src/Magnum/Platform/GlfwApplication.cpp
  2. 10
      src/Magnum/Platform/GlfwApplication.h

2
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);

10
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)

Loading…
Cancel
Save