mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Fix redundant redrawing in Pegs. Apparently it has always redrawn
every single peg and hole on the board, every time it did any kind of redraw at all, because I forgot to update the array in the drawstate indicating the last-drawn state of each position. And nobody's noticed until now! [originally from svn r9447]
This commit is contained in:
1
pegs.c
1
pegs.c
@ -1237,6 +1237,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
|
|||||||
(bgcolour != ds->bgcolour || /* always redraw when flashing */
|
(bgcolour != ds->bgcolour || /* always redraw when flashing */
|
||||||
v != ds->grid[y*w+x])) {
|
v != ds->grid[y*w+x])) {
|
||||||
draw_tile(dr, ds, COORD(x), COORD(y), v, bgcolour);
|
draw_tile(dr, ds, COORD(x), COORD(y), v, bgcolour);
|
||||||
|
ds->grid[y*w+x] = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user