summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sokoban.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sokoban.c')
-rw-r--r--apps/plugins/sokoban.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 29bdbbbba5..157f53ca92 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -1527,7 +1527,10 @@ static int sokoban_menu(void)
static bool sokoban_loop(void)
{
bool moved;
- int i = 0, button = 0, lastbutton = 0;
+ int i = 0, button = 0;
+#if defined(SOKOBAN_UNDO_PRE)
+ int lastbutton = 0;
+#endif
int w, h;
char *loc;
@@ -1629,8 +1632,9 @@ static bool sokoban_loop(void)
return PLUGIN_USB_CONNECTED;
break;
}
-
+#if defined(SOKOBAN_UNDO_PRE)
lastbutton = button;
+#endif
if (moved) {
rb->lcd_clear_display();