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:
Simon Tatham
2012-04-07 22:19:18 +00:00
parent e3f9741317
commit 4f81608c40

1
pegs.c
View File

@ -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;
} }
} }