aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-10-08 00:17:19 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-14 20:29:32 +0100
commit156b0c3e23acc3aee3f8a4f7d94132ba227de751 (patch)
tree1833630a63151e86966d88fb3a17ea479533545f
parent11b14a5f44967a6257ac1beabb6425f95f3b2c69 (diff)
downloadpuzzles-156b0c3e23acc3aee3f8a4f7d94132ba227de751.zip
puzzles-156b0c3e23acc3aee3f8a4f7d94132ba227de751.tar.gz
puzzles-156b0c3e23acc3aee3f8a4f7d94132ba227de751.tar.bz2
puzzles-156b0c3e23acc3aee3f8a4f7d94132ba227de751.tar.xz
Stop animations on a new game, no matter how it is started.
Animations were stopped if a new game was initiated with a keyboard shortcut (n, N, Ctrl-N), but not via menu items such as presets or custom configurations, nor (perhaps not a problem) on starting the program. Fix this, so that animations are stopped on a new game no matter how the new game is started.
-rw-r--r--midend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/midend.c b/midend.c
index 3107027..c520c13 100644
--- a/midend.c
+++ b/midend.c
@@ -355,6 +355,7 @@ void midend_force_redraw(midend *me)
void midend_new_game(midend *me)
{
+ midend_stop_anim(me);
midend_free_game(me);
assert(me->nstates == 0);
@@ -596,7 +597,6 @@ static int midend_really_process_key(midend *me, int x, int y, int button)
if (!movestr) {
if (button == 'n' || button == 'N' || button == '\x0E') {
- midend_stop_anim(me);
midend_new_game(me);
midend_redraw(me);
goto done; /* never animate */