diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-04-26 08:20:25 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-04-26 08:20:25 +0000 |
| commit | 22ab2c0b8237e1c51fdb479668ab764900f7d0c0 (patch) | |
| tree | 246bc520888e26d1b1173d4a8e2f26cfc46c872c | |
| parent | 80129693bb1b6370e1d7420a5aa13e8755f1f3cf (diff) | |
| download | puzzles-22ab2c0b8237e1c51fdb479668ab764900f7d0c0.zip puzzles-22ab2c0b8237e1c51fdb479668ab764900f7d0c0.tar.gz puzzles-22ab2c0b8237e1c51fdb479668ab764900f7d0c0.tar.bz2 puzzles-22ab2c0b8237e1c51fdb479668ab764900f7d0c0.tar.xz | |
Fix trivial UI glitch involving clicking on the border outside the
grid. I'm really starting to get annoyed by the default round-
towards-zero behaviour of C integer division.
[originally from svn r5681]
| -rw-r--r-- | solo.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1209,8 +1209,8 @@ static game_state *make_move(game_state *from, game_ui *ui, int x, int y, int tx, ty; game_state *ret; - tx = (x - BORDER) / TILE_SIZE; - ty = (y - BORDER) / TILE_SIZE; + tx = (x + TILE_SIZE - BORDER) / TILE_SIZE - 1; + ty = (y + TILE_SIZE - BORDER) / TILE_SIZE - 1; if (tx >= 0 && tx < cr && ty >= 0 && ty < cr && button == LEFT_BUTTON) { if (tx == ui->hx && ty == ui->hy) { |