1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Christian Soffke 2021-12-12 18:18:04 +01:00 committed by Aidan MacDonald
parent 747c8d5ea4
commit d04804b6ff

View file

@ -898,6 +898,8 @@ void root_menu(void)
next_screen = last_screen; next_screen = last_screen;
if (last_screen == GO_TO_PLUGIN)/* for WPS */ if (last_screen == GO_TO_PLUGIN)/* for WPS */
last_screen = GO_TO_PREVIOUS; last_screen = GO_TO_PREVIOUS;
else if (last_screen == GO_TO_PREVIOUS)
next_screen = GO_TO_ROOT;
break; break;
} }