diff options
author | ageazrael <ageazrael@gmail.com> | 2017-06-13 09:27:49 +0800 |
---|---|---|
committer | ageazrael <ageazrael@gmail.com> | 2017-06-13 09:27:49 +0800 |
commit | b3accab62d9ef04694fcc8b60a93fe3cfec79325 (patch) | |
tree | d363a7be6e31969da3a1bba4f856d4eec6b93d79 | |
parent | fc04e0b1f28823458e735675363fa7a649572a91 (diff) |
Fixed middle mouse button can't bounce in macOS
-rw-r--r-- | platform/osx/os_osx.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 72fba39e33..5ca4318fa7 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -409,14 +409,14 @@ static int button_mask = 0; if ((int)[event buttonNumber] != 2) return; - button_mask |= BUTTON_MASK_MIDDLE; + button_mask &= ~BUTTON_MASK_MIDDLE; Ref<InputEventMouseButton> mb; mb.instance(); get_key_modifier_state([event modifierFlags], mb); mb->set_button_index(BUTTON_MIDDLE); - mb->set_pressed(true); + mb->set_pressed(false); mb->set_position(Vector2(mouse_x, mouse_y)); mb->set_global_position(Vector2(mouse_x, mouse_y)); mb->set_button_mask(button_mask); |