mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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]
This commit is contained in:
4
solo.c
4
solo.c
@ -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) {
|
||||
|
Reference in New Issue
Block a user