From e3b20696cc877266867cb7d2c4641b40fc04c351 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 4 Feb 2019 17:06:32 +0100 Subject: [PATCH] end double mouse click state when doing a new single click. --- src/engine/client/input.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp index 08fa168a0..02440bf56 100644 --- a/src/engine/client/input.cpp +++ b/src/engine/client/input.cpp @@ -329,8 +329,13 @@ int CInput::Update() Scancode = KEY_MOUSE_8; // ignore_convention if(Event.button.button == 9) Scancode = KEY_MOUSE_9; // ignore_convention - if(Event.button.clicks % 2 == 0 && Event.button.button == SDL_BUTTON_LEFT) - m_MouseDoubleClick = true; + if(Event.button.button == SDL_BUTTON_LEFT) + { + if(Event.button.clicks % 2 == 0) + m_MouseDoubleClick = true; + if(Event.button.clicks == 1) + m_MouseDoubleClick = false; + } break; case SDL_MOUSEWHEEL: