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-861f7616d084
master
Guangcong Luo 2010-04-28 05:04:46 +00:00 committed by Git SVN Gateway
parent a993c51db9
commit edea97a633
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}