mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-26 16:48:51 +01:00
perform sanity checks if USB not connected and previous menu item was USB menu -> item set to 0 (volume)
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
d05f503825
commit
b7b91d4aae
@ -417,11 +417,16 @@ void MenuMode::init_menu_system_values(){
|
||||
usb_data_connected = Utils::executeRawPath(SHELL_CMD_USB_DATA_CONNECTED);
|
||||
usb_sharing = Utils::executeRawPath(SHELL_CMD_USB_CHECK_IS_SHARING);
|
||||
|
||||
if(usb_sharing && !usb_data_connected){
|
||||
MENU_ERROR_PRINTF("WARNING usb_sharing && !usb_data_connected\n");
|
||||
/** Sanity check if usb not connected */
|
||||
if(!usb_data_connected){
|
||||
usb_sharing = 0;
|
||||
|
||||
if(idx_menus[menuItem] == MENU_TYPE_USB){
|
||||
menuItem = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Sanity check if currently in USB sharing (should not happen) */
|
||||
if(usb_sharing){
|
||||
|
||||
/// Force USB menu to launch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user