From b3accab62d9ef04694fcc8b60a93fe3cfec79325 Mon Sep 17 00:00:00 2001 From: ageazrael Date: Tue, 13 Jun 2017 09:27:49 +0800 Subject: Fixed middle mouse button can't bounce in macOS --- platform/osx/os_osx.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform') 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 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); -- cgit v1.2.3