Sokoban: enable restarting level via "Select Level"

This patch disables the (deliberate) feature of "Select Level",
that selecting the current level wouldn't restart but rather
resume. (i.e. now selecting any level will always start this
from scratch).

There definitely should be a way to restart the current level
via menu. Currently the only possibility to do this is via
button presses, but (a) these are hard to remember combos, and
(b) they are not defined on all targets.
This patch is meant as a lightwight alternative to g#1356
(adding a "restart level" option to the menu).

Change-Id: I18ee5aff5c922f95c28d1edf2ba71dd2e50687d2
This commit is contained in:
Sebastian Leonhardt 2017-08-02 00:00:36 +02:00
parent 492dda0d57
commit f2f1889b10

View file

@ -1534,11 +1534,8 @@ static int sokoban_menu(void)
&current_info.level.index, NULL, 1, 1,
current_info.max_level, NULL);
current_info.level.index--;
if (prev_level != current_info.level.index) {
init_undo();
draw_level();
} else
menu_quit = false;
init_undo();
draw_level();
break;
case 2: /* Audio playback control */