summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2017-08-02 00:00:36 +0200
committerSebastian Leonhardt <sebastian.leonhardt@web.de>2017-08-23 01:15:50 +0200
commitf2f1889b108ad85ccfeedff6afcb4a98e06c5580 (patch)
tree120a21d654a8bf0bad6079268b79cb0012d35076
parent492dda0d5773ba49a431e69e45ee9f6831e68b02 (diff)
downloadrockbox-f2f1889b108ad85ccfeedff6afcb4a98e06c5580.tar.gz
rockbox-f2f1889b108ad85ccfeedff6afcb4a98e06c5580.tar.bz2
rockbox-f2f1889b108ad85ccfeedff6afcb4a98e06c5580.zip
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
-rw-r--r--apps/plugins/sokoban.c7
1 files changed, 2 insertions, 5 deletions
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)
&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 */