aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-08-15 00:38:57 +0530
committerEugene Sandulenko2019-09-03 17:17:33 +0200
commita69f6afe1061ff7d8cc98d9e80a96fc9fb5b269e (patch)
tree5a71bec7fa85e1fc4867a7df970a635bd7ce8471
parentae17affac04d7cb1ed64592c87b3473bc5ad2d38 (diff)
downloadscummvm-rg350-a69f6afe1061ff7d8cc98d9e80a96fc9fb5b269e.tar.gz
scummvm-rg350-a69f6afe1061ff7d8cc98d9e80a96fc9fb5b269e.tar.bz2
scummvm-rg350-a69f6afe1061ff7d8cc98d9e80a96fc9fb5b269e.zip
HDB: Convert FPS to Millis for double click check
-rw-r--r--engines/hdb/hdb.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index c310533cbd..4b4bc86c21 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -413,7 +413,12 @@ void HDBGame::setTargetXY(int x, int y) {
if (x == px && y == py) {
static uint32 dblClickTimer = 0;
- if (dblClickTimer && ((int)(g_system->getMillis() - dblClickTimer) < (int)(kGameFPS * 5))) {
+ if (dblClickTimer) {
+ debug("Double Click Timer: %d", dblClickTimer);
+ debug("Click Timer Diff: %d", (int)(g_system->getMillis() - dblClickTimer));
+ }
+
+ if (dblClickTimer && ((int)(g_system->getMillis() - dblClickTimer) < (int)(kGameFPS * 5 * 1000 / 60))) {
g_hdb->_window->openInventory();
dblClickTimer = 0;
} else