Пример #1
0
static void callback(UINT8 type, INT32 wparam, UINT32 lparam)
{
	UINT8 row, col, back_saved;
	UINT8 winner;
	win_popup_choice_t popResult;

	switch (type)
	{
		case TRANCHESS:
			row = wparam / 10-1;
			col = wparam % 10-1;
			draw_chess(row, col, (UINT8)lparam);
			break;

		case USER_NO_STEP:
			break;

		case COMPUTER_NO_STEP:
			break;

		case GAME_OVER:
			winner = (UINT8)wparam;
			update_status(Class, BlackPoint, WhitePoint);

			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_frame(GAME_MSG_LEFT, GAME_MSG_TOP, GAME_MSG_WIDTH, GAME_MSG_HEIGHT);

			if (winner == COMPUTER_WIN)
			{
				//"Sorry! You lost!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_SORRY_YOU_LOST);
			}
			else if (winner == USER_WIN)
			{
				//"You Win!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_YOU_WIN);
			}
			else
			{
				//"DOGFALL!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_DOGFALL);
			}
			win_compopup_open_ext(&back_saved);

			othello_init();
            OSD_ObjOpen((POBJECT_HEAD)&game_con, 0xFFFFFFFF) ;    
			/*
			othello_draw_background();
			update_status(Class, BlackPoint, WhitePoint,TRUE);

			OSD_SetAttr((POBJECT_HEAD) &txt_start, C_ATTR_ACTIVE);
			OSD_ChangeFocus((POBJECT_HEAD) &game_con, 1,  \
				C_UPDATE_FOCUS | C_DRAW_SIGN_EVN_FLG);
            */
			break;
	}
}
Пример #2
0
void aud_desc_show_hint(UINT32 ad_msg)
{
    char str[32];
    char lang[5];
    UINT8 back_saved;
    int ad_status = AD_MSG_STATUS(ad_msg);
    int ad_type = AD_MSG_TYPE(ad_msg);
    UINT16 ad_lang = AD_MSG_LANG(ad_msg);

    MEMSET(lang, 0, sizeof(lang));
    get_audio_lang3b((UINT8 *)&ad_lang,(UINT8 *)lang);

    if (ad_status == 0) // AD invalid
        sprintf(str, "%s AD not available", lang);
    else
    {
        if (ad_type == AD_MSG_TYPE_BOARDCASTER_MIX)
            sprintf(str, "AD Enable", lang);
        else if (ad_type == AD_MSG_TYPE_RECEIVER_MIX)
            sprintf(str, "%s AD Enable", lang);
    }

    win_compopup_init(WIN_POPUP_TYPE_SMSG);
    win_compopup_set_msg_ext(str, NULL, 0);

    win_compopup_open_ext(&back_saved);
    osal_task_sleep(1000);
    win_compopup_smsg_restoreback();
}
Пример #3
0
void win_ci_dlg_open(UINT16 *uni_str_status)
{
	UINT8 back_saved;
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_frame(CI_DLG_L, CI_DLG_T, CI_DLG_W, CI_DLG_H);
	win_compopup_set_msg_ext(NULL, (char*)uni_str_status, 0);
	win_msg_popup_open();
	bDlgShow = 1;
}
Пример #4
0
void dispSpiderCamdMsg(char *msgDisp)
{

	UINT8 back_saved;
	
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg_ext(msgDisp, NULL, 0);
	win_compopup_open_ext(&back_saved);	
	osal_task_sleep(3000);
	win_compopup_smsg_restoreback();
}
Пример #5
0
static void othello_start(void)
{
	UINT8 back_saved;
	//    othello_init();
	othello_draw_background();
	update_status(Class, BlackPoint, WhitePoint);

	win_compopup_init(WIN_POPUP_TYPE_OKNO);
	win_compopup_set_frame(GAME_MSG_LEFT, GAME_MSG_TOP, GAME_MSG_WIDTH, GAME_MSG_HEIGHT);
	win_compopup_set_msg_ext(NULL, NULL, RS_GAME_MSG_DO_YOU_BLACK);
	if (win_compopup_open_ext(&back_saved) == WIN_POP_CHOICE_NO)
	{
		computer_side = CHESS_BLACK;
		/* computer round */
		computer_play(&chess_board, callback);

		get_chess_score(&chess_board, &WhitePoint, &BlackPoint);
		update_status(Class, BlackPoint, WhitePoint);
	}
}
Пример #6
0
void cti_chnchg_function()
{
	UINT16 chn_idx=0xffff;
	date_time local_time;
	CTI_CHN_CHG_CONTENT chnchg_data;
	UINT8 save;
	BOOL need_change = TRUE,info_changed = FALSE;
	win_popup_choice_t sel;
	UINT16 string[CHANNEL_JUMP_STR_LEN_MAX/2+1];

	INT sec = 0;
	if(pre_channel_index!=sys_data_get_cur_group_cur_mode_channel())//换台了
	{
		cti_chnchg_para_reset();
	}

	if(!get_cti_chnchg_flg())
	{
		return;
	}

	MEMSET(&local_time,0,sizeof(date_time));
	get_local_time(&local_time);

	MEMSET(&chnchg_data,0,sizeof(CTI_CHN_CHG_CONTENT));
	get_cti_chnchg_data(&chnchg_data);

	//显示内容有没有变化
	if(MEMCMP(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString))==0)
	{
		info_changed = FALSE;
	}
	else
	{
		info_changed = TRUE;
	}

	chn_idx=GetPlayChannelID(chnchg_data.bType,chnchg_data.wPart1,
							chnchg_data.wPart2,chnchg_data.wPart3,chnchg_data.wPart4);

	if((chnchg_data.bStatus==0)
		||(chnchg_data.bStatus==2))//立即跳转
	{
		set_cti_chnchg_flg(FALSE);
	}
	else//时间跳转
	{
		if(api_compare_day_time_ext(&(chnchg_data.stStartTime),&local_time)>=0)	//跳转时间没有到
		{
			need_change = FALSE;
		}
		else if(api_compare_day_time_ext(&(chnchg_data.stEndTime),&local_time)>=0)	//正常跳转
		{
			sec = cti_mktime(&(chnchg_data.stEndTime),&local_time);
		}
		else//控制时间已过
		{
			need_change = FALSE;
			set_cti_chnchg_flg(FALSE);
			return;
		}
	}

	if((chn_idx!=0xffff)
		&&(chn_idx!=sys_data_get_cur_group_cur_mode_channel())
		&&need_change)
	{

		if(chnchg_data.bStatus==0)//强制立即跳转
		{
			BackToFullScrPlay();
			win_compopup_init ( WIN_POPUP_TYPE_SMSG );
			win_compopup_set_frame ( 100, 140, 400, 120);
			//win_compopup_set_frame(100, 180, 400, 80);
			win_compopup_set_msg_ext(NULL,NULL, RS_CTI_CHANNEL_JUMP);
			win_compopup_open_ext ( &save );
			osal_task_sleep(3000);
			win_compopup_close();
		}
		else if(chnchg_data.bStatus==1)//强制时间跳转
		{
			if(!info_showed)
			{
				BackToFullScrPlay();
				win_compopup_init ( WIN_POPUP_TYPE_SMSG );
				win_compopup_set_frame ( 100, 140, 400, 120);
				//win_compopup_set_frame(100, 180, 400, 80);
				win_compopup_set_msg_ext(NULL,NULL, RS_CTI_CHANNEL_JUMP);
				win_compopup_open_ext ( &save );
				osal_task_sleep(3000);
				win_compopup_close();
				info_showed = TRUE;
			}
		}
		else if(chnchg_data.bStatus==2)//用户选择立即跳转
		{
			if((sys_data_get_cur_group_cur_mode_channel()==chn_idx_sel_no)
				&&(!info_changed))
			{
				return;
			}
			else
			{
				BackToFullScrPlay();

				MEMSET(string,0,sizeof(string));
				MEMSET(pre_info,0,sizeof(pre_info));
#ifdef GB2312_SUPPORT
				convert_gb2312_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2);
#else
				dvb_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2, 0);
#endif
				MEMCPY(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString));
				win_compopup_init ( WIN_POPUP_TYPE_OKNO);				
				//win_compopup_set_frame ( 100, 120, 400, 160);
				win_compopup_set_frame ( 100, 100, 400, 160);
				win_compopup_set_msg_ext(NULL, string, 0);
				win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				sel = win_compopup_open_ext_timeout(&save, 5);
				if (sel == WIN_POP_CHOICE_NO)
				{
					chn_idx_sel_no = sys_data_get_cur_group_cur_mode_channel();
					return;//do not change
				}	
				//choice yes,so change channel
			}
		}
		else if(chnchg_data.bStatus==3)//用户选择按时间跳转
		{
			if((!info_showed)||info_changed)//没有显示过或者字符变化了
			{
				BackToFullScrPlay();

				MEMSET(string,0,sizeof(string));
				MEMSET(pre_info,0,sizeof(pre_info));
#ifdef GB2312_SUPPORT				
				convert_gb2312_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2);
#else
				dvb_to_unicode(chnchg_data.pString, 
				sizeof(chnchg_data.pString),string, CHANNEL_JUMP_STR_LEN_MAX/2, 0);
#endif
				MEMCPY(pre_info,chnchg_data.pString,sizeof(chnchg_data.pString));
				win_compopup_init ( WIN_POPUP_TYPE_OKNO);
				win_compopup_set_frame ( 100, 100, 400, 160);
				win_compopup_set_msg_ext(NULL, string, 0);
				win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				sel = win_compopup_open_ext_timeout(&save, sec);
				choiced_yes = FALSE;
				info_showed = TRUE;
				if ((sel == WIN_POP_CHOICE_NO) || (sel == WIN_POP_CHOICE_TIMEOUT))
				{
					return;//do not change
				}	
				choiced_yes = TRUE;
			}
			else if(choiced_yes==TRUE)//用户选择yes,则继续判断是否需要跳转
			{

			}
			else
			{
				return;//提示过,不再提醒,也不换台
			}

		}

		api_play_channel(chn_idx, TRUE, TRUE, FALSE);
	}
}
Пример #7
0
static PRESULT othello_key_proc(UINT32 vkey, UINT8 key_repeat_cnt, UINT8 key_status)
{
	PRESULT ret = PROC_LOOP;
	UINT8 back_saved;
	if (key_status == PAN_KEY_PRESSED)
	{
		switch (vkey)
		{
			case V_KEY_UP:
			case V_KEY_DOWN:
			case V_KEY_LEFT:
			case V_KEY_RIGHT:
				draw_cursor(cur_row, cur_col, WSTL_GAME_BACKGROUND_IDX);
				if (vkey == V_KEY_UP)
				{
					cur_row = cur_row == 0 ? 7 : cur_row - 1;
				}
				else if (vkey == V_KEY_DOWN)
				{
					cur_row = cur_row == 7 ? 0 : cur_row + 1;
				}
				else if (vkey == V_KEY_LEFT)
				{
					cur_col = cur_col == 0 ? 7 : cur_col - 1;
				}
				else if (vkey == V_KEY_RIGHT)
				{
					cur_col = cur_col == 7 ? 0 : cur_col + 1;
				}
				draw_cursor(cur_row, cur_col, WSTL_GAME_CURSOR_IDX);
				break;

			case V_KEY_ENTER:
				if (do_move_chess(&chess_board, (cur_row + 1) *10+(cur_col + 1), ~computer_side &3, callback))
				{
					draw_cursor(cur_row, cur_col, WSTL_GAME_BACKGROUND_IDX);

					get_chess_score(&chess_board, &WhitePoint, &BlackPoint);
					update_status(Class, BlackPoint, WhitePoint);

					/* computer round */
					computer_play(&chess_board, callback);

					get_chess_score(&chess_board, &WhitePoint, &BlackPoint);
					update_status(Class, BlackPoint, WhitePoint);

					draw_cursor(cur_row, cur_col, WSTL_GAME_CURSOR_IDX);
				}
				break;

			case V_KEY_MENU:
			case V_KEY_EXIT:
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_frame(GAME_MSG_LEFT, GAME_MSG_TOP, GAME_MSG_WIDTH, GAME_MSG_HEIGHT);
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_MSG_DO_YOU_QUIT);
				if (win_compopup_open_ext(&back_saved) == WIN_POP_CHOICE_YES)
				{
					othello_init();
                    OSD_ObjOpen((POBJECT_HEAD)&game_con, 0xFFFFFFFF) ;  
					/*othello_init();
					othello_draw_background();
					update_status(Class, BlackPoint, WhitePoint,TRUE);
					OSD_SetAttr((POBJECT_HEAD) &txt_start, C_ATTR_ACTIVE);
					OSD_ChangeFocus((POBJECT_HEAD) &game_con, 1,  \
						C_UPDATE_FOCUS | C_DRAW_SIGN_EVN_FLG);*/
				}
				break;
			default:
				ret = PROC_PASS;
				break;
		}
	}

	return ret;
}
Пример #8
0
/*****************************************************
Interface : void GetListChapterInfo(UINT16 top);
Function  : set each item's display content of list
Author    : Wu Jianwen
Date      : 2010.8.25
Input     : top:first item of list
Output    : NONE
Return    : NONE
******************************************************/
void GetListChapterInfo(INT16 top)
{
	UINT8 len = 0;
	UINT8 i = 0;
	INT32 hh,mm,ss;         //start time
	INT32 hh2,mm2,ss2;      //end time
	UINT8 arr_DataTemp[50];
	UINT8  back_saved;
	INT32 i_TotalChapter = 0;      //the total chapter of the video
	INT32 i_CurChapStartTime = 0;   //current chapter start time
	INT32 i_CurChapEndTime = 0;     //current chapter end time
	INT32 i_DestChapStartTime = 0;  //Dest chapter start time
	INT32 i_DestChapEndTime = 0;    //Dest chapter end time
	INT32 i_DestChapter = 0;        //dest chapter num
    INT32 i_CurChapter = 1;         //current chapter num
    INT32 i_ChapterChange = 0;
	DEC_CHAPTER_INFO t_ChapterInfo; //save chapter info of the stream
	

	MEMSET(&t_ChapterInfo,0,sizeof(DEC_CHAPTER_INFO));
	t_ChapterInfo.dst_chapter = -1;
	MpgFileGetChapterInfo(&t_ChapterInfo);   //get the current chapter info 
	i_CurChapter = t_ChapterInfo.cur_chapter;   //begin with chapter
	i_TotalChapter = t_ChapterInfo.nb_chapter;
			
	if(i_TotalChapter > 1)   //only chapter num > 1 can switch
	{
		if(top > i_TotalChapter)
		{
			top = 0;
			OSD_SetListCurPos(&g_ls_chapter,0);
			OSD_SetListTop(&g_ls_chapter,0);
		}
		i = 0;
		for(i = 0;i < CHAPTER_ITEM_NUMBER;i++)
		{
			i_ChapterChange = top + i;
			if(i_ChapterChange < i_TotalChapter)
			{
				i_DestChapter = i_ChapterChange;
				t_ChapterInfo.dst_chapter = i_DestChapter;
				MpgFileGetChapterInfo(&t_ChapterInfo);
				i_DestChapStartTime = t_ChapterInfo.dst_start_time / 1000;
				hh = i_DestChapStartTime / 3600;
				mm = (i_DestChapStartTime % 3600) / 60;
				ss = i_DestChapStartTime % 60;
				i_DestChapEndTime = t_ChapterInfo.dst_end_time / 1000;
				hh2 = i_DestChapEndTime / 3600;
				mm2 = (i_DestChapEndTime % 3600) / 60;
				ss2 = i_DestChapEndTime % 60;

				arr_DataTemp[0] = hh;
				arr_DataTemp[1] = mm;
				arr_DataTemp[2] = ss;
				arr_DataTemp[3] = hh2;
				arr_DataTemp[4] = mm2;
				arr_DataTemp[5] = ss2;
				win_com_set_idx_str2(arr_DataTemp, &Chapter_track_str[i][0],6);
				win_com_set_idx_str(top+i, Chapter_track_idx[i], 2);
			}		
			else
			{
				//memset(&Chapter_track_idx[i],0,40);
				break;
			}
		}
	}
	else
	{
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H);
        win_compopup_set_msg_ext("There is only one chapter!",NULL,0);
        win_compopup_open_ext(&back_saved);
        osal_task_sleep(1500);
        win_compopup_smsg_restoreback();
	}
}
Пример #9
0
static void hddfmt_start()
{
	UINT8 back_saved;
	win_popup_choice_t choice;
	UINT8 mode;
	struct dvr_HDD_info hdd_info;
	char volume_name[48];
	char osd_name[48];
	char hint[64];
	BOOL ret;

	disk_format_mode_num = get_fsystem_installed(disk_mode, 8);
	//sprintf(temp, "%s", disk_mode[input]);

	storage_index_to_osd_string((UINT8)hddfmt_cur_volume,osd_name);	
	sprintf(hint, "Are you sure to format the %s?", osd_name);

	if(disk_format_mode_num == 1)
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNO);
		win_compopup_set_btnstr_ext(0, disk_mode[0]);
		win_compopup_set_default_choice(WIN_POP_CHOICE_NO);		
	}
	else if(disk_format_mode_num == 2)
	{
		win_compopup_init(WIN_POPUP_TYPE_OKNOCANCLE);
		win_compopup_set_btnstr_ext(0, disk_mode[0]);
		win_compopup_set_btnstr_ext(1, disk_mode[1]);
		win_compopup_set_default_choice(WIN_POP_CHOICE_CANCEL);		
	}
	win_compopup_set_msg(hint, NULL, 0);
	choice = win_compopup_open_ext(&back_saved);

	if(((disk_format_mode_num == 1) && (choice == WIN_POP_CHOICE_YES)) || ((disk_format_mode_num == 2) && ((choice == WIN_POP_CHOICE_YES) || (choice == WIN_POP_CHOICE_NO))))
	{
		if(choice == WIN_POP_CHOICE_YES)
			mode = 1;
		else
			mode = 2;

		storage_index2volume((UINT8)hddfmt_cur_volume,volume_name);
		storage_add_parent_dir(volume_name);		
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		win_compopup_set_frame(GET_MID_L(286), GET_MID_T(130), 286, 130);
		win_compopup_set_msg_ext("formating wait!",NULL,0);
		win_compopup_open_ext(&back_saved);
		ret = pvr_format_multi_hdd(mode, volume_name);
		win_compopup_smsg_restoreback();

		if(!ret) 		
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			sprintf(hint, "Format %s error?", osd_name);
			win_compopup_set_msg(hint, NULL, 0);
			win_compopup_set_default_choice(WIN_POP_CHOICE_CANCEL);		
			win_compopup_open_ext(&back_saved);
			return;
		}

		if(STRCMP((char *)pvr_get_mout_prefix(), volume_name)==0)
		{
			if(pvr_get_HDD_info(&hdd_info))
			{
				api_pvr_check_level(&hdd_info);		
				ap_clear_all_message();//or usb reflash msg maybe send fail
				pvr_evnt_callback(0, PVR_HDD_FORMATTED);
			}		
		}
		win_hddfmt_draw_disk_infor();
	}
}
Пример #10
0
static void win_miscset_save_setting(void)
{
	MULTISEL	*msel;
	SYSTEM_DATA* sys_data;
	UINT32 val;

	sys_data = sys_data_get();

#ifndef NEW_DEMO_FRAME
	struct nim_lnb_info lnb_info;
	for(i=0;i<2;i++)
	{
        lib_nimg_get_lnb_info(i+1,&lnb_info);
        if(LNB_POWER_OFF == sys_data->bLNB_power)
            lnb_info.lnb_power_off = 1;
        else
            lnb_info.lnb_power_off = 0;                      
		lib_nimg_set_lnb_info(i+1,&lnb_info);
	}
#else
	struct nim_config lnb_info;
	struct nim_device *nim;
UINT16 i;
	for(i=0;i<2;i++)
	{
        nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, i);
        dev_get_nim_config(nim,FRONTEND_TYPE,&lnb_info);
        if(LNB_POWER_OFF == sys_data->bLNB_power)
            lnb_info.antenna.antenna_enable = /*0*/1;   //Seiya fix BUG37540:
        else
            lnb_info.antenna.antenna_enable = 1;                   
	    dev_set_nim_config(nim, FRONTEND_TYPE, &lnb_info);
	}
#endif

	msel =&miscset_sel1;
	val = OSD_GetMultiselSel(msel);
	sys_data->chan_sw = val;
	
	msel =&miscset_sel2;
	val = OSD_GetMultiselSel(msel);
	sys_data->chchgvideo_type = val;

#ifdef CHANCHG_VIDEOTYPE_SUPPORT
#ifndef NEW_DEMO_FRAME
	UIChChgSetVideoType(sys_data->chchgvideo_type);
#endif
#endif
	
	msel =&miscset_sel3;
	val = OSD_GetMultiselSel(msel);
	sys_data->install_beep = val;

    msel =&miscset_sel4;
	val = OSD_GetMultiselSel(msel);
	sys_data->auto_standby_en= val;


#ifdef ORDER_GZ1207009
	   msel =&miscset_sel6;
	val = OSD_GetMultiselSel(msel);
	sys_data->standbymode= val;
#endif

#ifdef RAM_TMS_TEST
    msel =&miscset_sel5;
	val = OSD_GetMultiselSel(msel);

	char rec_part[16];
	char tms_part[16];

	if (sys_data->ram_tms_en != val) // detach tms part
	{
		rec_part[0] = tms_part[0] = 0;
		pvr_get_cur_mode(rec_part, tms_part);
		if (tms_part[0] != 0)
		{
			if (STRCMP(rec_part, tms_part) == 0)
				pvr_set_disk_use(PVR_REC_ONLY_DISK, rec_part);
			else
				pvr_detach_part(tms_part, PVR_TMS_ONLY_DISK);
			api_pvr_adjust_tms_space();
		}
	}
	
	if (sys_data->ram_tms_en == 0 && val == 1) // enable RAM disk timeshift
	{
		UINT32 ram_len = RAM_DISK_SIZE;	
		UINT32 ram_addr = (void *)(RAM_DISK_ADDR & 0x0fffffff | 0x80000000);

		ramdisk_create((UINT32)ram_addr, ram_len);

		struct pvr_register_info pvr_reg_info;
		MEMSET(&pvr_reg_info, 0, sizeof(struct pvr_register_info));
		STRCPY(pvr_reg_info.mount_name, "/mnt/rda1");
		pvr_reg_info.disk_usage = PVR_TMS_ONLY_DISK;
		pvr_reg_info.sync = 1;
		pvr_reg_info.init_list = 0;
		pvr_reg_info.check_speed = 0;
		pvr_register((UINT32)&pvr_reg_info, 0);
	}
	else if (sys_data->ram_tms_en == 1 && val == 0) // disable RAM disk timeshift
	{
		ramdisk_delete();
	}

	if (sys_data->ram_tms_en != val)
	{
		if (val == 0) // disable RAM disk timeshift, select PVR partition again
		{
			UINT8 back_saved;
			rec_part[0] = tms_part[0] = 0;
			pvr_select_part(rec_part, tms_part);
			if (rec_part[0] != 0 || tms_part[0] != 0)
			{
				win_compopup_init(WIN_POPUP_TYPE_SMSG); 					   
				win_compopup_set_msg_ext("Init PVR partitions, please wait...", NULL, 0);
				win_compopup_open_ext(&back_saved);
				if (STRCMP(rec_part, tms_part) == 0)
				{
					pvr_change_part(rec_part, PVR_REC_AND_TMS_DISK);
				}
				else
				{
					pvr_change_part(rec_part, PVR_REC_ONLY_DISK);
					pvr_change_part(tms_part, PVR_TMS_ONLY_DISK);
				}
				win_compopup_smsg_restoreback();
			}
		}
		
		struct dvr_HDD_info hdd_info;
		pvr_get_HDD_info(&hdd_info);
		api_pvr_check_level(&hdd_info);
		if (pvr_get_cur_mode(NULL, NULL) == PVR_DISK_INVALID)
		{
			api_pvr_clear_up_all();
		}
	}
	sys_data->ram_tms_en = val;
#endif

    sys_data_save(1);
    
}
Пример #11
0
void win_popup_ad_setting(void)
{
    UINT8 back_saved;

    if (sys_data_get_ad_service() == 0)
    {
        win_compopup_init(WIN_POPUP_TYPE_SMSG);
        win_compopup_set_msg("Please Open Audio Description Component", NULL, 0);
        win_compopup_open_ext(&back_saved);
        osal_task_sleep(1000);
        win_compopup_smsg_restoreback();
        return;
    }
    ad_show_flag = 1;

    if (sys_data_get_ad_mode() == 0)
    {
        sys_data_set_ad_mode(1);
        audio_change_pid(-1, FALSE);
    }
    else
    {
        sys_data_set_ad_mode(0);
        audio_change_pid(-1, FALSE);

        win_compopup_init(WIN_POPUP_TYPE_SMSG);
        win_compopup_set_msg_ext("AD Disable", NULL, 0);
        win_compopup_open_ext(&back_saved);
        osal_task_sleep(1000);
        win_compopup_smsg_restoreback();
    }
#if 0
    win_compopup_init(WIN_POPUP_TYPE_OKNO);
    win_compopup_set_msg("Use AD as default", NULL, 0);
    win_compopup_set_btnstr_ext(0, "ON");
    win_compopup_set_btnstr_ext(1, "OFF");
    win_popup_choice_t choice = sys_data_get_ad_mode() ?
                                WIN_POP_CHOICE_YES : WIN_POP_CHOICE_NO;
    win_compopup_set_default_choice(choice);
    ID timer_id = win_compopup_start_send_key_timer(V_KEY_EXIT, 5000, TIMER_ALARM);
    choice = win_compopup_open_ext(&back_saved);
    api_stop_timer(&timer_id);
    if (choice == WIN_POP_CHOICE_YES)
    {
        if (sys_data_get_ad_mode() == 0)
        {
            sys_data_set_ad_mode(1);
            audio_change_pid(-1, FALSE);
            sys_data_save(1);
        }
    }
    else if (choice == WIN_POP_CHOICE_NO)
    {
        if (sys_data_get_ad_mode() == 1)
        {
            sys_data_set_ad_mode(0);
            audio_change_pid(-1, FALSE);
            sys_data_save(1);
        }
    }
#endif
}
Пример #12
0
static void dm_disk_show_hint(UINT32 dev_type, UINT32 dev_id, UINT32 hint_type)
{
	UINT8 i;
	UINT16 hint[128]={0};
	char strUsb[128];
	char strA[128];
	char strCon[128];
	char strUcon[128];
	char strSd[128];
	char strIde[128];
	char strSata[128];
	UINT8 back_saved;
	UINT16 *unistr=NULL;
	
#ifdef SUPPORT_CAS9
	if(get_mmi_showed()!=0)//mmi pri is high than this popup
		return;
#endif

#ifndef _SYSTEM_DVBC
	switch (dev_type)
	{
		case MNT_TYPE_USB:
			//sprintf(hint, "USB disk %c", dev_id+'A');
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USB_DISK),strUsb);
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_KEY_A),strA);
			sprintf(hint," %c ",dev_id);
			strcat(strUsb,hint);
			strcat(strUsb,strA);
			strcat(strUsb," ");
			STRCPY(hint,strUsb);
			break;
		case MNT_TYPE_SD:
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SD_CARD),strSd);
			sprintf(hint, strSd);
			break;
		case MNT_TYPE_IDE:
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_IDE_DISK),strIde);
			sprintf(hint, strIde);
			break;
		case MNT_TYPE_SATA:
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SATA_DISK),strSata);
			sprintf(hint, strSata);
			break;
		default:
			return;
	}

	switch (hint_type)
	{
		case DM_HINT_CONNECT:
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTED),strCon);
			strcat(hint,strCon);
			break;
		case DM_HINT_DISCONNECT:
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DISCONNECTED),strUcon);
			strcat(hint,strUcon);
			break;
		default:
			return;
	}
	DM_DEBUG("%s() show message: %s\n", __FUNCTION__, hint);
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg_ext(hint, NULL,  0);
	
#else

	if(hint_type==DM_HINT_CONNECT)
	{
		if(dev_type==MNT_TYPE_USB)
		{
			unistr=OSD_GetUnicodeString(RS_USB_DISK_CONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
			
		}
		else if(dev_type==MNT_TYPE_SD)
		{
			unistr=OSD_GetUnicodeString(RS_SD_CARD_CONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}
		else if(dev_type==MNT_TYPE_IDE)
		{
			unistr=OSD_GetUnicodeString(RS_IDE_DISK_CONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}
		else if(dev_type==MNT_TYPE_SATA)
		{
			unistr=OSD_GetUnicodeString(RS_SATA_DISK_CONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}

	}
	else if(hint_type==DM_HINT_DISCONNECT)
	{
		if(dev_type==MNT_TYPE_USB)
		{
			unistr=OSD_GetUnicodeString(RS_USB_DISK_DISCONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
			
		}
		else if(dev_type==MNT_TYPE_SD)
		{
			unistr=OSD_GetUnicodeString(RS_SD_CARD_DISCONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}
		else if(dev_type==MNT_TYPE_IDE)
		{
			unistr=OSD_GetUnicodeString(RS_IDE_DISK_DISCONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}
		else if(dev_type==MNT_TYPE_SATA)
		{
			unistr=OSD_GetUnicodeString(RS_SATA_DISK_DISCONNECTED);
			ComUniStrCopyChar(&hint,(UINT16 *)unistr);
		}
	}
	DM_DEBUG("%s() show message: %s\n", __FUNCTION__, hint);
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg_ext(NULL,hint,  0);
#endif

    #ifdef SUPPORT_CAS9
        win_compopup_set_frame(290, 250, 448, 100);
    #endif

	win_compopup_open_ext(&back_saved);	
	osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
}