mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 08:25:45 -07:00
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.
This commit is contained in:

committed by
Simon Tatham

parent
11b14a5f44
commit
156b0c3e23
2
midend.c
2
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 */
|
||||
|
Reference in New Issue
Block a user