📄 setup_tab.c
字号:
if(SETUP_VIDEO_FORMAT==5)//jhuang eastwin 2004/8/16
{
SETUP_VIDEO_FORMAT = MIN_ITEM_SEL;
run_save_sel_cmd(SYSPAGE,2);
setup_tv_out(INTERLACE);
}
#endif
}
}
else
{
printf("read eeprom setup check error\n");
}
#ifdef MONE_SETUP
printf("chksum=%02x\n",unChksum);
#endif
}
if (iRts < 0)
{
//set to default, when
//1. different ROM-code-checksum(setup-EEPROM vs. ROM)
//2. counted setup-checksum != stored in setup EEPROM
#ifdef MONE_SETUP
printf("read eeprom setup menu,fail!!\n");
#endif
SETUP_CUSTM_REGION = REGION_NUM+2; //nono 20031121
UserSet.P_RCD = REGION_NUM;
set_default_value();
run_save_total_sel();
#ifdef Ti3001_OSD_UI_1 // jason 2-10-5 15:30
reset_amplifier_default_setup();
#endif
#ifdef POWER_RESUME
RsmInfo2Flash(1); //clear resume flash memory, Jeff 20020928
#endif
}
//read UserSet for DVD-related
//if (iRts>0)
iRts=ReadFromI2c(0xa0, sizeof(UINT32)+sizeof(setup_sel)+2, (BYTE *)&UserSet, sizeof(t_USER_SET));
if(iRts>0)
{
printf("read eeprom system menu,ok!!\n");
UserSet.P_RCD = SETUP_CUSTM_REGION - 2;
} else
{
printf("read eeprom system menu,fail!!\n");
SETUP_CUSTM_REGION = REGION_NUM+2; //Jeff 20021012
UserSet.P_RCD = REGION_NUM;
}
SETUP_CUSTM_REGION = UserSet.P_RCD+2;
#ifdef SUPER_DEFAULT_OSD_LANG
SETUP_CUSTM_OSDLANG = UserSet.setup_default_osd_lang + 2;
#endif
run_set_variable();
//David added 2003-12-17 23:01 temp
//Syber required: No need switch video output, only YUV default
#if defined(YUV_DEFAULT_OUTPUT) && defined(DELETE_VIDEO_ITEM)
#ifdef S_VIDEO_OUT
regs0->emu_cfg[1]|=0x100;
#endif //#ifdef S_VIDEO_OUT
setup_tv_out(INTERLACE);//set S-video output(composited+component)(0x00:D0-D1-D2-D3=CVBS-V-Y-U)
search_ap_tv_out_id();//terry,2003/8/19 03:21PM
#endif
//UserSet.M_LCD = 'z' * 256 + 'h';
//china zh ,taiwan tw
//china
UserSet.CTY_CD=('C'<<8)|('N');
UserSet.P_A_CFG=0xffff;// should be config//uinted states:US ,china:CN , taiwan:TW
if (SETUP_PASSWORD == (MIN_ITEM_SEL+1) ) {
UserSet.parental_ststus=C_UNLOCK;
} else {
UserSet.parental_ststus=C_LOCK;
SETUP_PASSWORD = MIN_ITEM_SEL;
}
#ifdef MONE_SETUP
printf("load setup menu,out\n");
#endif
//check password and grade
#ifdef RATING_8
if ( (SETUP_GRADE<2) || (SETUP_GRADE>9) ) {
SETUP_GRADE = 9;
// UserSet.parent_passwd = 0;//NONO mark it.3-11-23 22:17
// UserSet.parental_ststus = C_UNLOCK;//NONO mark it.3-11-23 22:17
UserSet.parent_passwd = DEFAULT_PASSWORD; //Jeff 20020703
}
#else
if ( (SETUP_GRADE<2) || (SETUP_GRADE>4) ) {
SETUP_GRADE = 4;
UserSet.parent_passwd = 0;
UserSet.parental_ststus = C_UNLOCK;
UserSet.parent_passwd = DEFAULT_PASSWORD; //Jeff 20020703
}
#endif
#ifdef SETUP_6_DIGIT_PASSWORD//zhaoyanhua add 03-10-14 14:10
if (UserSet.parent_passwd > 999999)
#else //4 digit
if (UserSet.parent_passwd > 9999)
#endif //end SETUP_6_DIGIT_PASSWORD
{
UserSet.parent_passwd = 0;
UserSet.parental_ststus = C_UNLOCK;
}
setupLevel = 0;
#if defined(SAME_DISC_RESUME)&&defined(NEXTPAGE_SYS)//freyman 2004-3-26 0:01 alan, 3-9-30 18:59
if(setup_sel[SysNextPage][SAME_DISC_RESUME_ITEM]==3)
same_disc_onoff=1;
else
same_disc_onoff=0;//CLEAD 2003-9-29
printf("\n\n====same_disc_onoff:%d====\n",same_disc_onoff);
#endif
#ifdef BBK_DVD //fengjl add 3-11-25 22:09 for YUV output when next power on
#define VIDEO_OUTPUT_OFFSET 240
int res = ReadFromI2c(0xa0, VIDEO_OUTPUT_OFFSET,(BYTE *)&tv_out_id,sizeof(tv_out_id));
if(res < 0) tv_out_id = INTERLACE;
setup_tv_out(tv_out_id);
//audio key set default value.zhaoyanhua add 2003-12-4 11:44
audio_key = 0;
#endif
#ifdef VGA_CTRL_FORMAT//wangfeng 2003-12-18 18:55
int res = ReadFromI2c(0xa0, ADDR_I2C_VGA,(BYTE *)&temp_format,sizeof(temp_format));
if(res)
if(temp_format)
{
exe_setup_function(STR_OS_TV_SYS,temp_format,1);//terry,2004/2/3 01:34PM
}
#endif
}
void show_main_title(int id)
{
#ifndef SPE_SETUP //2004-4-22 06:51张宇P
const char *str;
int start,len;
#ifdef DVB_MENU_SETUP_STYLE
extern const char *osd_str_dvb_mainmenu[N_OSD_LANGS][2];
if(system_state == SYSTEM_TS)
{
if((page == INSTALLPAGE))
{
osd_DrawString(2, 2, osd_str_dvb_mainmenu[osd_font_mode][0], 7,SBLACKCOLOR/*SWHITECOLOR, SBLACKCOLOR*/);
return;
}
else if((page == CHANNELPAGE))
{
osd_DrawString(2, 2, osd_str_dvb_mainmenu[osd_font_mode][1], 7,SBLACKCOLOR/*SWHITECOLOR, SBLACKCOLOR*/);
return;
}
}
#endif
//count main menu title string length
str = _OsdMessegeFont1[osd_font_mode][id];
len = strlen(str);
if ( IsOSDChinese() ) {
len = len*2;
}
start = SETUP_MAX_WIDTH/2-len+2;
#ifdef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:16
osd_DrawString(3, 2, (char *)str, 7,SBLACKCOLOR/*SWHITECOLOR, SBLACKCOLOR*/);
#elif defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-2 18:02
if(id == STR_OS_SYS_SETUP)
osd_DrawRegionString(2, 13, (char *)str, 12,SBLACKCOLOR,0);
else if(id == STR_OS_LANG_SETUP)
osd_DrawRegionString(8, 13, (char *)str, 12,SBLACKCOLOR,0);
else if(id == STR_OS_AUD_SETUP)
osd_DrawRegionString(16, 13, (char *)str, 12,SBLACKCOLOR,0);
else if(id == STR_OS_KARAOKE_SETUP)
osd_DrawRegionString(22, 13, (char *)str, 12,SBLACKCOLOR,0);
#else
osd_DrawString(2, 2, (char *)str, 7,SBLACKCOLOR/*SWHITECOLOR, SBLACKCOLOR*/);
#endif
#endif
}
void draw_3rd_menu()
{
int i;
BYTE fontColor, bgColor;
BYTE upDown;
const char *str;
//draw ">" between sub-mean and it's corresponding selection area
#ifdef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 17:12
osd_DrawString(SETUP_SUB_XSTART-1, index_y+SETUP_MENU_YSTART+1, Ch_arrorR, SANTIFONTCOLOR, SBGCOLOR);
#else
osd_DrawString(SETUP_SUB_XSTART-1, index_y+SETUP_MENU_YSTART+1, Ch_arrorR, SFONTCOLOR, SBGCOLOR);
#endif// QSI_SETUP_MENU_DESIGN
#ifdef VIDEO_SETUP_NEW_GUI//zhaoyanhua add 2004-1-7 17:15
if(page == VIDEOPAGE)
{
for(i = 0; i < (setupItemNum[1]); i++ )
{
if(setup_item[page][i][0] == SET_SCALE)//"EXIT" item, return
{
if(index_y == i)
fontColor = 4;
else
fontColor = SFONTCOLOR;
setup_VideoItemValue(i, fontColor,SBGCOLOR);
}
}
return;
}
#endif
//show first selection menu of third-level menu
for (i=2; i<MAX_ITEM_SEL; i++)
{
//get select item
#ifdef BBK_NEW_SETUP//zhaoyanhua add 2003-11-18 17:15
#if !defined(BBK_DSS_555_DVD)&&!defined(BBK_DV911S) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE
if(one_key_pass_flag)//OENKEYPASSPAGE
{
sel = GetOneKeyPageSel(index_y);
}
else
#endif
sel=setup_sel[page][index_y];
#else
sel = setup_sel[page][index_y+index_y_start];
#endif
id = setup_item[page][index_y+index_y_start][i];
if (id==0)
{
if (setup_item[page][index_y+index_y_start][0]==SET_SCALE)
setup_PrepareScaleItem(setup_item[page][index_y+index_y_start][1], 0);
break;
}
str = setup_SetItemString();
#ifdef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:16
if (sel == i)
{
fontColor = SDEFAULTCOLOR;//4; //SFONTCOLOR;
bgColor = SBGCOLOR; // SANTIBGCOLOR;
upDown = 1;
} else {
fontColor = 2;//SFONTCOLOR;
bgColor = SBGCOLOR;
upDown = 0;
}
#elif defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-4 16:52
if (sel == i)
{
fontColor = SDEFAULTCOLOR;//4; //SFONTCOLOR;
bgColor = SBGCOLOR; // SANTIBGCOLOR;
upDown = 1;
}
else {
fontColor = SFONTCOLOR;
bgColor = SBGCOLOR;
upDown = 0;
}
#else
if (sel == i)
{
fontColor = 4; //SFONTCOLOR;
bgColor = SBGCOLOR; // SANTIBGCOLOR;
upDown = 1;
} else {
#ifdef SELECT_MEDIA_IN_SETUPMENU
if( IsSetupMediaItemDisable(i) )
fontColor = SGRAYCOLOR;
else
#endif
fontColor = SFONTCOLOR;
bgColor = SBGCOLOR;
upDown = 0;
}
#endif
//special item(PASSWORD), page-0, item-4
if (setup_item[page][index_y+index_y_start][0]==SET_NM)
{
submenuStart = index_y+SETUP_MENU_YSTART;//zhaoyanhua add 2004-1-16 11:03
if (UserSet.parental_ststus==C_LOCK)
{
setup_sel[page][index_y+index_y_start] = MIN_ITEM_SEL;
str = _OsdMessegeFont1[osd_font_mode][STR_OS_LOCK];
} else {
setup_sel[page][index_y+index_y_start] = MIN_ITEM_SEL + 1;
str = _OsdMessegeFont1[osd_font_mode][STR_OS_UNLOCK];
}
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 16:41
osd_draw_setup_button(SETUP_SUB_XSTART, (submenuStart)+1, SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2, SANTIBGCOLOR, 1);
#endif
osd_DrawString(SETUP_SUB_XSTART+1, (submenuStart)+1, str, SANTIFONTCOLOR, SANTIBGCOLOR);
}
else
{
#ifdef RATING_8
//when I draw PASSWORD GUI, return main seutp with"ShowSetupPage()",
//rating8 show uncorrectly. so I add the following codes
//zhaoyanhua 2004-1-16 10:44
if ( (page==SYSPAGE) && (index_y == GRADEITEM) )
{
submenuStart = SETUP_MENU_YSTART;
}
else
#endif
#ifdef SUPER_DEFAULT_OSD_LANG
if(index_y==CUSTMOSDITEM)
{
if((8-N_OSD_LANGS)>=4)
submenuStart = index_y + SETUP_MENU_YSTART;
else
submenuStart = SETUP_MENU_YSTART + (8-N_OSD_LANGS) + 1;
}else
#endif
submenuStart = index_y+SETUP_MENU_YSTART;
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 16:41
osd_draw_setup_button(SETUP_SUB_XSTART, (i-2)+submenuStart+1, SETUP_MAX_WIDTH-SETUP_SUB_XSTART-2, bgColor, upDown);
#endif
//printf("#### in draw3rdmenu --- draw string ---\n");
osd_DrawString(SETUP_SUB_XSTART+1, (i-2)+submenuStart+1, str, fontColor, bgColor);
}
}
setupItemNum[2] = i-2;
}
void setup_func_return_main(void)
{
setupLevel=0;
index_y = 0;
index_y_start=0;
ShowSetupPage(1);
}
void ShowSel(BYTE xStart, BYTE yStart,BYTE xLen,BYTE down)
{
BYTE fnColor,bgColor;
const char *str;
str = setup_SetItemString();
//#ifdef SETUP_COLOR_TYPE1 //wangfeng 2003-08-29 17:16
#if defined(SETUP_COLOR_TYPE1) || defined( QSI_SETUP_MENU_DESIGN)//liweihua 2004-7-4 16:46
if (down)
fnColor=SDEFAULTCOLOR;//4;
else
fnColor=SFONTCOLOR;
bgColor = SBGCOLOR;
#else
if (down)
fnColor=4;
else
fnColor=SFONTCOLOR;
bgColor = SBGCOLOR;
#endif
#ifndef QSI_SETUP_MENU_DESIGN//liweihua 2004-7-4 16:41
osd_draw_setup_button(xStart,yStart,xLen, bgColor, down);
#endif
osd_DrawString(xStart+1, yStart, str, fnColor, bgColor);
}
//NOTE: the following .h files only include UI function,such as
// LEFT,RIGHT, UP, DOWN, SELECT, ShowSetupPage.
#ifdef NEW_STYLE_SETUP//zhaoyanhua add 3-7-25 17:29
#include "setup_newstyle_ui.c"
#elif defined(SOFT_MENU)//Modifed by ChenZhao on 2004-9-8 17:39 WP
#include "setup_tab_ui_SFM.c"
#else
#include "setup_tab_ui.c"
#endif //NEW_STYLE_SETUP
#ifdef NEW_STYLE_SETUP //zhaoyanhua add 3-7-25 19:18
void init_setup(void)
{
page = 0;
index_y=0;
index_y_start=0;
setupLevel=0;
GBM_run_setupmenu_flag = 0;
//setup_tv_format(MODE_NTSC);//force to NTSC zhaoyanhua note 2003-07-19 21:39
full_scrn=SETUP; //setup menu
//read_setup_select(); // read data from EEPROM or Flush
//printf("IN Init_SETUP NEW STYLE\n");
//osd_init_setup();//zhaoyanhuamask
//ShowSetupPage(2);//zhaoyanhua amsk
//zhaoyanhua add the following page.
//printf("getVPP_TVsystem():%x\n",getVPP_TVsystem());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -