From f2f1889b108ad85ccfeedff6afcb4a98e06c5580 Mon Sep 17 00:00:00 2001 From: Sebastian Leonhardt Date: Wed, 2 Aug 2017 00:00:36 +0200 Subject: 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 --- apps/plugins/sokoban.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 5662bceebe..75a79a0754 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -1534,11 +1534,8 @@ static int sokoban_menu(void) ¤t_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 */ -- cgit v1.2.3