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)
This commit is contained in:
Chris Boyle
2023-02-10 15:23:33 +00:00
committed by Ben Harris
parent a1f1d7c247
commit 111db0743b

View File

@ -2267,6 +2267,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
if (!INGRID(state, gx, gy)) { if (!INGRID(state, gx, gy)) {
/* can't drag from off grid */ /* can't drag from off grid */
ui->drag_sx = ui->drag_sy = -1;
return NULL; return NULL;
} }