summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 5c9eeb7f5..7215061b7 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2241,7 +2241,7 @@ void HandleMouseEvents()
_input_events_this_tick++;
}
- static int hover_time = 0;
+ static uint32 hover_time = 0;
static Point hover_pos = {0, 0};
if (_settings_client.gui.hover_delay > 0) {
@@ -2252,7 +2252,7 @@ void HandleMouseEvents()
hover_time = _realtime_tick;
_mouse_hovering = false;
} else {
- if (hover_time != 0 && _realtime_tick - hover_time > _settings_client.gui.hover_delay * 1000) {
+ if (hover_time != 0 && _realtime_tick > hover_time + _settings_client.gui.hover_delay * 1000) {
click = MC_HOVER;
_input_events_this_tick++;
_mouse_hovering = true;