Make double-click interval game-speed independent (patch idea by Safety0ff)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10735 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
a993c51db9
commit
edea97a633
|
@ -328,7 +328,7 @@ void inputHandleMouseButtonEvent(SDL_MouseButtonEvent * buttonEvent)
|
|||
&& buttonEvent->button != SDL_BUTTON_WHEELDOWN))
|
||||
{
|
||||
//whether double click or not
|
||||
if ( gameTime - aMouseState[buttonEvent->button].lastdown < DOUBLE_CLICK_INTERVAL )
|
||||
if ( realTime - aMouseState[buttonEvent->button].lastdown < DOUBLE_CLICK_INTERVAL )
|
||||
{
|
||||
aMouseState[buttonEvent->button].state = KEY_DOUBLECLICK;
|
||||
aMouseState[buttonEvent->button].lastdown = 0;
|
||||
|
@ -336,7 +336,7 @@ void inputHandleMouseButtonEvent(SDL_MouseButtonEvent * buttonEvent)
|
|||
else
|
||||
{
|
||||
aMouseState[buttonEvent->button].state = KEY_PRESSED;
|
||||
aMouseState[buttonEvent->button].lastdown = gameTime;
|
||||
aMouseState[buttonEvent->button].lastdown = realTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue