Improve:Emmc switch in playback screen.

This commit is contained in:
xiaojiazhu 2023-12-28 11:38:05 +08:00
parent be75a48f61
commit e336717f56

View File

@ -57,6 +57,7 @@ extern void PBView_DrawErrorView(void);
//#NT#2023/11/14#Eric - begin //#NT#2023/11/14#Eric - begin
//#NT#Support IVOT_N12144_CO-148_A //#NT#Support IVOT_N12144_CO-148_A
extern void PBView_DrawNoFile(void); extern void PBView_DrawNoFile(void);
static void stop_play(void);
//#NT#2023/11/14#Eric - end //#NT#2023/11/14#Eric - end
static BOOL g_PlayBgInitFileSys = FALSE; static BOOL g_PlayBgInitFileSys = FALSE;
@ -182,23 +183,29 @@ static void update_play_Selection_msg(lv_obj_t* obj)
} }
void show_select_function(lv_obj_t* obj) void show_select_function(lv_obj_t* obj)
{ {
lv_label_set_text(label_option1_scr_uiflowplay, "Storage Options"); if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
lv_label_set_text(label_option2_scr_uiflowplay, "Delete"); lv_label_set_text(label_option1_scr_uiflowplay, "Storage Options");
} lv_label_set_text(label_option2_scr_uiflowplay, "Delete");
void show_Selection_page(lv_obj_t* obj, lv_obj_t* menu_obj) } else {
{ lv_label_set_text(label_option1_scr_uiflowplay, "EMMC");
pMenu = menu_obj; lv_label_set_text(label_option2_scr_uiflowplay, "SD Card");
gSeletionShow = SELECTION_SHOW_TURE;
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,false);
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage)
{
show_select_function(obj);
} }
}
void show_Selection_page(lv_obj_t* obj)
{
// pMenu = menu_obj;
gSeletionShow = SELECTION_SHOW_TURE;
ProfileFocused = 0;
ProfileTotal = 2;
ProfileSelected = 0;
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,false);
show_select_function(obj);
update_play_Selection_msg(obj); update_play_Selection_msg(obj);
} }
void hide_Selection_page(void) void hide_Selection_page(void)
{ {
gSeletionShow = SELECTION_SHOW_FALSE; gSeletionShow = SELECTION_SHOW_FALSE;
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true); lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true);
} }
void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
@ -230,12 +237,40 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
update_play_Selection_msg(obj); update_play_Selection_msg(obj);
break; break;
case LV_USER_KEY_LEFT: case LV_USER_KEY_LEFT:
// lv_plugin_scr_close(obj, gen_nvtmsg_data(NVTRET_ENTER_MENU, 0)); if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
// hidde_Network_Selection_page(); hide_Selection_page();
break; } else {
case LV_USER_KEY_RIGHT: gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
show_Selection_page(obj);
}
break; break;
case LV_USER_KEY_RIGHT:
case LV_KEY_ENTER: case LV_KEY_ENTER:
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
if (1 == ProfileFocused)
{
hide_Selection_page();
UINT32 uiFileSeq;
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
if (0 != uiFileSeq)
{
stop_play();
UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS);
break;
}
} else {
gOptionPage = OPTION_PAGE_FORMAT;
show_Selection_page(obj);
}
} else {
if (1 == ProfileFocused)
{
printf(" ================================== switch sd card.\n");
} else {
printf(" ================================== switch emmc.\n");
}
hide_Selection_page();
}
break; break;
default: default:
break; break;
@ -2237,7 +2272,7 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
case LV_USER_KEY_PREV: case LV_USER_KEY_PREV:
{ {
if (SELECTION_SHOW_FALSE == gSeletionShow) { if (SELECTION_SHOW_FALSE == gSeletionShow) {
show_Selection_page(obj, container_main_menu_scr_uiflowplay); show_Selection_page(obj);
} else { } else {
} }