📄 lcd_osd.c
字号:
{
case PAGE2_ITEM_POSH :
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (ucH_Min_Margin >= stMUD.H_POSITION)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.H_POSITION = stMUD.H_POSITION > ucH_Min_Margin ? stMUD.H_POSITION - 1 : ucH_Min_Margin;
else
stMUD.H_POSITION = stMUD.H_POSITION > (ucH_Min_Margin + 2) ? stMUD.H_POSITION - 3 : ucH_Min_Margin;
}
else
{
if (ucH_Max_Margin <= stMUD.H_POSITION)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.H_POSITION = stMUD.H_POSITION < ucH_Max_Margin ? stMUD.H_POSITION + 1 : ucH_Max_Margin;
else
stMUD.H_POSITION = stMUD.H_POSITION < (ucH_Max_Margin - 2) ? stMUD.H_POSITION + 3 : ucH_Max_Margin;
}
OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 2, 14);
Set_H_Position();
Set_Phase(stMUD.PHASE);
Save_MUD(ucMode_Curr);
break;
case PAGE2_ITEM_POSV :
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if ((unsigned int)256 - ucV_Min_Margin <= stMUD.V_POSITION)
break;
stMUD.V_POSITION += 1;
}
else
{
if (ucV_Min_Margin >= stMUD.V_POSITION)
break;
stMUD.V_POSITION -= 1;
}
OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margin), 100, 2, 14);
Set_V_Position();
Save_MUD(ucMode_Curr);
break;
case PAGE2_ITEM_PHASE :
#if(MORE_PHASE)
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (0x7f <= stMUD.PHASE)
break;
stMUD.PHASE += 1;
}
else
{
if (0x00 == stMUD.PHASE)
break;
stMUD.PHASE -= 1;
}
OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 2, 14);
#else
stMUD.PHASE &= 0x7c;
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (0x7c <= stMUD.PHASE)
break;
stMUD.PHASE += 4;
}
else
{
if (0x00 == stMUD.PHASE)
break;
stMUD.PHASE -= 4;
}
OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 2, 14);
#endif
Set_Phase(stMUD.PHASE);
Save_MUD(ucMode_Curr);
break;
case PAGE2_ITEM_CLOCK :
#if(ALIGN_LEFT == CLOCK_ALIGN)
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (178 <= stMUD.CLOCK)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.CLOCK = (177 >= stMUD.CLOCK) ? stMUD.CLOCK + 1 : 178;
else
stMUD.CLOCK = (176 >= stMUD.CLOCK) ? stMUD.CLOCK + 2 : 178;
Set_Clock();
Set_H_Position();
}
else
{
if (78 >= stMUD.CLOCK)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.CLOCK = (79 <= stMUD.CLOCK) ? stMUD.CLOCK - 1 : 78;
else
stMUD.CLOCK = (80 <= stMUD.CLOCK) ? stMUD.CLOCK - 2 : 78;
Set_H_Position();
Set_Clock();
}
OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 2, 14);
#else
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (228 <= stMUD.CLOCK)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.CLOCK = (227 >= stMUD.CLOCK) ? stMUD.CLOCK + 1 : 228;
else
stMUD.CLOCK = (226 >= stMUD.CLOCK) ? stMUD.CLOCK + 2 : 228;
Set_Clock();
Set_H_Position();
}
else
{
if (28 >= stMUD.CLOCK)
break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
stMUD.CLOCK = (29 <= stMUD.CLOCK) ? stMUD.CLOCK - 1 : 28;
else
stMUD.CLOCK = (30 <= stMUD.CLOCK) ? stMUD.CLOCK - 2 : 28;
Set_H_Position();
Set_Clock();
}
OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 2, 14);
#endif
Save_MUD(ucMode_Curr);
break;
case PAGE2_ITEM_SHARP :
// if (NOTIFY_RIGHT_KEY == Key)
if (NOTIFY_LEFT_KEY == Key)
{
if (5 <= ucOSD_Item_Index1)
break;
ucOSD_Item_Index1 = ucOSD_Item_Index1 + 1;
}
else
{
if (1 >= ucOSD_Item_Index1)
break;
ucOSD_Item_Index1 = ucOSD_Item_Index1 - 1;
}
OSD_Line( 9, 36, 14, 0x40, 2); //Set color to black
OSD_Line( 9, 36 + (ucOSD_Item_Index1-1)*(2+1), 1, 0x20, 2);
stGUD1.FILTER = ucOSD_Item_Index1 - 1;
Sharpness();
if((usIPH_ACT_WID == 1280) && (DISP_SIZE == DISP_1280x1024) && (stGUD1.FILTER == 0x02))
RTDSetBit(SCALE_CTRL_15, 0xff, 0x01); // Turn on H scale-up
else if((usIPH_ACT_WID == 1280) && (DISP_SIZE == DISP_1280x1024) && (stGUD1.FILTER != 0x02))
RTDSetBit(SCALE_CTRL_15, 0xfe, 0x00); // Turn off H scale-up
Save_GUD1();
break;
}
}
else
{
Osd_Change_Item(Key,PAGE2_ITEM_NUM);
}
}
void Page2_Show()
{
Show_Osd_Page(1,Page2_Atb,1);
//Set Window 5 to select "Picture"
OSD_Window( 5, 10, 136, 87, 117, 1, 1, 14, 251, 0, 1, 25);
if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
{
ucOSD_Item_Index0 = 0;
ucOSD_Item_Index1 = 0;
}
if (SOURCE_VGA != (stGUD1.INPUT_SOURCE & 0x07) && PAGE2_ITEM_SHARP != ucOSD_Item_Index0)
{
ucOSD_Item_Index1 = 0;
}
if (0 == ucOSD_Item_Index1)
{
OSD_Slider(5, 31, 17, ucH_Max_Margin - stMUD.H_POSITION, ucH_Max_Margin - ucH_Min_Margin, 4, 14);
OSD_Slider(7, 31, 17, (unsigned int)(stMUD.V_POSITION - ucV_Min_Margin) * 50 / (128 - ucV_Min_Margin), 100, 4, 14);
#if(MORE_PHASE)
OSD_Slider(11, 31, 17, stMUD.PHASE, 127, 4, 14);
#else
OSD_Slider(11, 31, 17, (stMUD.PHASE & 0x7c) >> 2, 31, 4, 14);
#endif
#if(ALIGN_LEFT == CLOCK_ALIGN)
OSD_Slider(13, 31, 17, stMUD.CLOCK - 78, 100, 4, 14);
#else
OSD_Slider(13, 31, 17, stMUD.CLOCK - 28, 200, 4, 14);
#endif
}
else
{
switch (ucOSD_Item_Index0)
{
case PAGE2_ITEM_POSH :
break;
case PAGE2_ITEM_POSV :
break;
case PAGE2_ITEM_PHASE :
break;
case PAGE2_ITEM_CLOCK :
break;
case PAGE2_ITEM_SHARP :
break;
}
}
}
/*
bit Page3_Enter_Key(void)
{
if (0 == ucOSD_Item_Index0)
{
if ((MODE_NOSIGNAL != ucMode_Curr) && (MODE_NOSUPPORT != ucMode_Curr) && (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)))
{
// Select and highlight the first item
ucOSD_Item_Index0 = PAGE3_ITEM_AUTOCFG;
ucOSD_Item_Index1 = 0;
OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
}
}
else
{
if (PAGE3_ITEM_EXIT == ucOSD_Item_Index0)
{
// Disable highlight window
OSD_Window( 6, 150, 282, (54 + (ucOSD_Item_Index0-1)*(29+4)), (84 + (ucOSD_Item_Index0-1)*(29+4))
, 0, 0, 14, 251, 0, 1, 0);
// De-select the page item and disable the hightlight window
ucOSD_Item_Index0 = 0;
ucOSD_Item_Index1 = 0;
}
else if (ucOSD_Item_Index1)
{
if (1 == ucOSD_Item_Index1)
{
switch (ucOSD_Item_Index0)
{
case PAGE3_ITEM_AUTOCFG :
if (MODE_0640x0350x70HZ <= ucMode_Curr && MODE_0720x0400x70HZ >= ucMode_Curr)
{
unsigned char ucResult;
stMUD.CLOCK = 128;
Set_H_Position();
Set_Clock();
Save_MUD(ucMode_Curr);
ucResult = Auto_Phase();
if (ERROR_SUCCEED == ucResult)
{
ucResult = Auto_Position();
}
if (ERROR_INPUT == ucResult)
{
ucMode_Curr = MODE_OSDFORCE;
return 0;
}
}
else
{
if (ERROR_INPUT == Auto_Config())
{
ucMode_Curr = MODE_OSDFORCE;
return 0;
}
}
OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
break;
case PAGE3_ITEM_AUTOBAL :
if (ERROR_INPUT == Auto_Balance())
{
ucMode_Curr = MODE_OSDFORCE;
return 0;
}
OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x40, 2);
break;
}
}
switch (ucOSD_Item_Index0)
{
case PAGE3_ITEM_AUTOCFG :
OSD_Line( 5, 36, 14, 0x40, 2); //Set color to black
break;
case PAGE3_ITEM_AUTOBAL :
OSD_Line( 7, 36, 14, 0x40, 2); //Set color to black
break;
}
ucOSD_Item_Index1 = 0; // Leave the item
//Show_Mode();
}
else
{
if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
return 1;//break;
ucOSD_Item_Index1 = 2; // Enter the item, default NO
switch (ucOSD_Item_Index0)
{
case PAGE3_ITEM_AUTOCFG :
OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
break;
case PAGE3_ITEM_AUTOBAL :
OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
break;
}
}
}
}
*/
/*
void Page3_Left_Right_Key(unsigned char Key)
{
if (ucOSD_Item_Index1)
{
ucOSD_Item_Index1 = (NOTIFY_LEFT_KEY == Key) ? 1 : 2;
switch (ucOSD_Item_Index0)
{
case PAGE3_ITEM_AUTOCFG :
OSD_Line( 5, 36, 14, 0x40, 2); //Set color to black
OSD_Line( 5, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
break;
case PAGE3_ITEM_AUTOBAL :
OSD_Line( 7, 36, 14, 0x40, 2); //Set color to black
OSD_Line( 7, 36 + (ucOSD_Item_Index1-1)*(6+1), 4, 0x20, 2);
break;
}
}
else
{
Osd_Change_Item(Key,PAGE3_ITEM_NUM);
}
}
void Page3_Show(void)
{
Show_Osd_Page(2,Page3_Atb,2);
//Set Window 5 to select "Functuin"
OSD_Window( 5, 10, 136, 120, 150, 1, 1, 14, 251, 0, 1, 25);
if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
{
ucOSD_Item_Index0 = 0;
ucOSD_Item_Index1 = 0;
}
}
*/
void Page4_Enter_Key(void)
{
if (0 == ucOSD_Item_Index0)
{
// Select and highlight the first item
ucOSD_Item_Index0 = PAGE4_ITEM_LANGUAGE;
ucOSD_Item_Index1 = 0;
OSD_Window( 6, 150, 282, 54, 84, 1, 1, 14, 251, 0, 1, 25);
}
else
{
switch (ucOSD_Item_Index0)
{
case PAGE4_ITEM_LANGUAGE :
ucOSD_Item_Index1 = (stGUD1.FUNCTION & 0x07) + 1;
OSD_Proc_B(NOTIFY_SHOW); // Show the sub-page
break;
case PAGE4_ITEM_OSDH :
if (ucOSD_Item_Index1)
{
ucOSD_Item_Index1 = 0; // Leave the item
Get_OSD_Margin();
OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 4, 14);
}
else
{
ucOSD_Item_Index1 = 1; // Enter the item, show slider
Get_OSD_Margin();
OSD_Slider(7, 31, 17, stGUD1.OSD_POSH - Data[0], Data[1] - Data[0], 2, 14);
}
break;
case PAGE4_ITEM_OSDV :
if (ucOSD_Item_Index1)
{
ucOSD_Item_Index1 = 0; // Leave the item
Get_OSD_Margin();
OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 4, 14);
}
else
{
ucOSD_Item_Index1 = 1; // Enter the item, slider
Get_OSD_Margin();
OSD_Slider(9, 31, 17, stGUD1.OSD_POSV - Data[2], Data[3] - Data[2], 2, 14);
}
break;
case PAGE4_ITEM_TIMEOUT :
if(ucOSD_Item_Index2)
{
ucOSD_Item_Index2 = 0;
ucOSD_Item_Index1 = 0; // Leave the item
//Redraw the ON/OFF words
OSD_Line( 11, 31, 3, 0x40, 2);
OSD_Line( 11, 31, 3, 0x00, 1);
OSD_Line( 11, 36, 12, 0x8a, 0);
OSD_Line( 11, 36, 12, 0x00, 1);
switch( stGUD1.FUNCTION & 0x07 )
{
case 5:
OSD_Line( 11, 37, 1, 0x8c, 0);
OSD_Line( 11, 37, 1, 0xb3, 1);
OSD_Line( 11, 43, 1, 0x8c, 0);
OSD_Line( 11, 43, 1, 0xc9, 1);
break;
case 6:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -