From 111db0743bd273c340dd683449076fd9ec5797f5 Mon Sep 17 00:00:00 2001 From: Chris Boyle Date: Fri, 10 Feb 2023 15:23:33 +0000 Subject: [PATCH] Tracks: set drag_s{x,y} even if starting off-grid Otherwise, if subsequent mouse/finger movement lines up with the previous drag attempt's start, then suddenly a drag is in progress from there, which is confusing. Fixes #588 (cherry picked from Android port, commit 8ce1bbe460d70a915caf2dbeb30354d22dc8a8ef) --- tracks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tracks.c b/tracks.c index 6948b42..0579d4b 100644 --- a/tracks.c +++ b/tracks.c @@ -2267,6 +2267,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, if (!INGRID(state, gx, gy)) { /* can't drag from off grid */ + ui->drag_sx = ui->drag_sy = -1; return NULL; }