X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/935b93502aeb0c39892a127ac8cb1380652fd61b..b8d5c7bc17fcb037c23d323d4f8fbdbab9894d9d:/src/x11.c diff --git a/src/x11.c b/src/x11.c index 0326db9..c8ef335 100644 --- a/src/x11.c +++ b/src/x11.c @@ -290,9 +290,11 @@ void x11_redraw_game(struct app_state *state, uint_fast32_t mask) } /* Optimize the game end case where the outer frame is cleared */ - if (((gp[0] | gp[1] | gp[2]) & ~GOAL_MASK) == 0) { - clear_border(display, game, sz); - mask &= GOAL_MASK; + if (mask & GAME_MASK & ~GOAL_MASK) { + if (((gp[0] | gp[1] | gp[2]) & ~GOAL_MASK) == 0) { + clear_border(display, game, sz); + mask &= GOAL_MASK; + } } for (i = 0; i < 25; i++) {