aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-05-07 12:12:18 +0000
committerMax Horn2008-05-07 12:12:18 +0000
commitaff41a48b89173de8bb93e9ee9ae901f9578c0b5 (patch)
tree4afd235173c0f30556e1d20488bd9d770439fcdd
parenta3dbf43629b44c49156c33ff5b178ec8aaf93a03 (diff)
downloadscummvm-rg350-aff41a48b89173de8bb93e9ee9ae901f9578c0b5.tar.gz
scummvm-rg350-aff41a48b89173de8bb93e9ee9ae901f9578c0b5.tar.bz2
scummvm-rg350-aff41a48b89173de8bb93e9ee9ae901f9578c0b5.zip
minor tweak to the GUI double click handling code
svn-id: r31922
-rw-r--r--gui/newgui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 5e034b726c..0bf61d084f 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -219,6 +219,7 @@ void NewGui::runLoop() {
Dialog *activeDialog = getTopDialog();
bool didSaveState = false;
int button;
+ uint32 time;
if (activeDialog == 0)
return;
@@ -252,7 +253,6 @@ void NewGui::runLoop() {
_system->updateScreen();
Common::Event event;
- uint32 time = _system->getMillis();
while (eventMan->pollEvent(event)) {
if (activeDialog != getTopDialog() && event.type != Common::EVENT_QUIT && event.type != Common::EVENT_SCREEN_CHANGED)
@@ -288,6 +288,7 @@ void NewGui::runLoop() {
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_RBUTTONDOWN:
button = (event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2);
+ time = _system->getMillis();
if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay)
&& ABS(_lastClick.x - event.mouse.x) < 3
&& ABS(_lastClick.y - event.mouse.y) < 3) {