From 73e0199696344976edce562e89a8516eb9d46617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 26 May 2019 18:51:33 +0200 Subject: [PATCH] Platform: well, these OTOH *don't* need to be flags. --- src/Magnum/Platform/EmscriptenApplication.cpp | 2 +- src/Magnum/Platform/EmscriptenApplication.h | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Magnum/Platform/EmscriptenApplication.cpp b/src/Magnum/Platform/EmscriptenApplication.cpp index ad79e3d46..c84e5c13b 100644 --- a/src/Magnum/Platform/EmscriptenApplication.cpp +++ b/src/Magnum/Platform/EmscriptenApplication.cpp @@ -530,7 +530,7 @@ void EmscriptenApplication::exit(int) { } EmscriptenApplication::MouseEvent::Button EmscriptenApplication::MouseEvent::button() const { - return Button(1 << _event->button); + return Button(_event->button); } Vector2i EmscriptenApplication::MouseEvent::position() const { diff --git a/src/Magnum/Platform/EmscriptenApplication.h b/src/Magnum/Platform/EmscriptenApplication.h index b1b62f31d..29c1fb20a 100644 --- a/src/Magnum/Platform/EmscriptenApplication.h +++ b/src/Magnum/Platform/EmscriptenApplication.h @@ -989,14 +989,9 @@ class EmscriptenApplication::MouseEvent: public EmscriptenApplication::InputEven * @see @ref button() */ enum class Button: std::int32_t { - /** Left mouse button */ - Left = 1 << 0, - - /** Middle mouse button */ - Middle = 1 << 1, - - /** Right mouse button */ - Right = 1 << 2 + Left, /**< Left mouse button */ + Middle, /**< Middle mouse button */ + Right /**< Right mouse button */ }; /** @brief Button */ @@ -1028,7 +1023,7 @@ class EmscriptenApplication::MouseMoveEvent: public EmscriptenApplication::Input * * @see @ref buttons() */ - enum class Button: std::int32_t { + enum class Button: Int { /** Left mouse button */ Left = 1 << 0,