diff options
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 14 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.h | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 02af945d8c..6e70bb6540 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -4435,17 +4435,17 @@ bool CBGame::isDoubleClick(int buttonIndex) { Point32 pos;
CBPlatform::getCursorPos(&pos);
- int moveX = abs(pos.x - _lastClick[buttonIndex].PosX);
- int moveY = abs(pos.y - _lastClick[buttonIndex].PosY);
+ int moveX = abs(pos.x - _lastClick[buttonIndex].posX);
+ int moveY = abs(pos.y - _lastClick[buttonIndex].posY);
- if (_lastClick[buttonIndex].Time == 0 || CBPlatform::getTime() - _lastClick[buttonIndex].Time > maxDoubleCLickTime || moveX > maxMoveX || moveY > maxMoveY) {
- _lastClick[buttonIndex].Time = CBPlatform::getTime();
- _lastClick[buttonIndex].PosX = pos.x;
- _lastClick[buttonIndex].PosY = pos.y;
+ if (_lastClick[buttonIndex].time == 0 || CBPlatform::getTime() - _lastClick[buttonIndex].time > maxDoubleCLickTime || moveX > maxMoveX || moveY > maxMoveY) {
+ _lastClick[buttonIndex].time = CBPlatform::getTime();
+ _lastClick[buttonIndex].posX = pos.x;
+ _lastClick[buttonIndex].posY = pos.y;
return false;
} else {
- _lastClick[buttonIndex].Time = 0;
+ _lastClick[buttonIndex].time = 0;
return true;
}
}
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h index bb8cdce402..09251aedf1 100644 --- a/engines/wintermute/Base/BGame.h +++ b/engines/wintermute/Base/BGame.h @@ -358,13 +358,13 @@ private: struct LastClickInfo {
LastClickInfo() {
- PosX = PosY = 0;
- Time = 0;
+ posX = posY = 0;
+ time = 0;
}
- int PosX;
- int PosY;
- uint32 Time;
+ int posX;
+ int posY;
+ uint32 time;
};
LastClickInfo _lastClick[2];
|