summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-12-12 18:18:04 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-12-24 10:38:18 -0500
commitd04804b6ff2d3dec54b73f410706b4b678ccdaa2 (patch)
treeba56946b8af122871b4edf688826a28fada5df31 /apps
parent747c8d5ea422d0eb93d85eabc18eb8887b10861d (diff)
downloadrockbox-d04804b6ff2d3dec54b73f410706b4b678ccdaa2.tar.gz
rockbox-d04804b6ff2d3dec54b73f410706b4b678ccdaa2.zip
Root menu: prevent infinite loop trying to exit plugin
Rockbox could enter into an infinite loop when last_screen and next_screen were both GO_TO_PREVIOUS, which happened when trying to quit PictureFlow in the following scenario: 1) start playback from PictureFlow plugin 2) return (or be returned) to WPS directly 3) wait for playback to finish and to be returned to PF plugin Change-Id: I0b52d4df56d416f81cef027d9024e964a734fcdc
Diffstat (limited to 'apps')
-rw-r--r--apps/root_menu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index e4020ae6c7..c10064499c 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -898,6 +898,8 @@ void root_menu(void)
next_screen = last_screen;
if (last_screen == GO_TO_PLUGIN)/* for WPS */
last_screen = GO_TO_PREVIOUS;
+ else if (last_screen == GO_TO_PREVIOUS)
+ next_screen = GO_TO_ROOT;
break;
}