end double mouse click state when doing a new single click.

This commit is contained in:
oy 2019-02-04 17:06:32 +01:00 committed by Robert Müller
parent bbc194ce2a
commit e3b20696cc

View file

@ -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: