📄 lcd_osd_rel.lst
字号:
786 6 ucMode_Curr = MODE_OSDFORCE;
787 6 return;
788 6 }
789 5 }
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 14
790 4 else
791 4 {
792 5 if (ERROR_INPUT == Auto_Config())
793 5 {
794 6 ucMode_Curr = MODE_OSDFORCE;
795 6 return;
796 6 }
797 5 }
798 4 }
799 3 else
800 3 {
801 4 ucOSD_Page_Index = 0;
802 4 ucOSD_Item_Index0 = 0;
803 4 ucOSD_Item_Index1 = 0;
804 4 ucOSD_Item_Index2 = 0;
805 4 }
806 3 }
807 2 RTDCodeW(OSD_Reset);
808 2 fac_timer = 0;
809 2 break;
810 2 default :
811 2 // We don't handle other messages
812 2 fac_timer = 0;
813 2 break;
814 2 }
815 1 }
816
817
818 #define PAGE1_ITEM_NUM 4
819 #define PAGE1_ITEM_NONE 0
820 #define PAGE1_ITEM_CONTRAST 1
821 #define PAGE1_ITEM_BRIGHT 2
822 #define PAGE1_ITEM_GAMMA 3
823 #define PAGE1_ITEM_EXIT 4
824
825 void OSD_Proc1(unsigned char action)
826 {
827 1 switch (action)
828 1 {
829 2 case NOTIFY_ENTER_KEY :
830 2 if (0 == ucOSD_Item_Index0)
831 2 {
832 3 if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
833 3 {
834 4 // Select and highlight the first item
835 4 ucOSD_Item_Index0 = PAGE1_ITEM_CONTRAST;
836 4 ucOSD_Item_Index1 = 0;
837 4 OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, 7, COLOR_CYAN);
838 4 }
839 3 }
840 2 else
841 2 {
842 3 if (ucOSD_Item_Index1 && (ucOSD_Item_Index0 != 3))
843 3 {
844 4 ucOSD_Item_Index1 = 0; // Leave the item
845 4 Show_Mode();
846 4 }
847 3 else
848 3 {
849 4 if (PAGE1_ITEM_EXIT == ucOSD_Item_Index0)
850 4 {
851 5 // De-select the page item and disable the hightlight window
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 15
852 5 ucOSD_Item_Index0 = 0;
853 5 ucOSD_Item_Index1 = 0;
854 5
855 5 // Disable highlight window
856 5 OSD_Window(1, (2 + PAGE1_ITEM_EXIT), (2 + PAGE1_ITEM_EXIT), 7, 23, 3, COLOR_CYAN);
857 5 }
858 4 else if (MODE_NOSIGNAL != ucMode_Curr && MODE_NOSUPPORT != ucMode_Curr)
859 4 {
860 5 switch (ucOSD_Item_Index0)
861 5 {
862 6 case PAGE1_ITEM_CONTRAST :
863 6 ucOSD_Item_Index1 = 1;
864 6 OSD_Slider(11, 2, 20, stGUD0.CONTRAST, 100, 0x61);
865 6 break;
866 6 case PAGE1_ITEM_BRIGHT :
867 6 ucOSD_Item_Index1 = 1;
868 6 #if (BRIGHT_TYPE == GAIN)
869 6 OSD_Slider(11, 2, 20, stGUD0.BRIGHT, 100, 0x61);
870 6 #endif
871 6 #if (BRIGHT_TYPE == LIGHT)
OSD_Slider(11, 2, 20, fac_light, 100, 0x61);
#endif
874 6 break;
875 6 case PAGE1_ITEM_GAMMA :
876 6 ucOSD_Item_Index1 = 1;
877 6 if(ucOSD_Item_Index2==0)
878 6 ucOSD_Item_Index2 = 3 - ((stGUD1.INPUT_SOURCE & 0x18) >>3);
879 6 RTDCodeW((3 == ucOSD_Item_Index2) ? OSD_Temp_2
880 6 : (2 == ucOSD_Item_Index2) ? OSD_Temp_1 : OSD_Temp_0);
881 6 switch (ucOSD_Item_Index2)
882 6 {
883 7 case 1 : //6500
884 7 stGUD1.INPUT_SOURCE = ( stGUD1.INPUT_SOURCE & 0xe7) | 0x10;
885 7 Set_Bright_Contrast();
886 7 Save_GUD0();
887 7 Save_GUD1();
888 7 break;
889 7 case 2 : //7800
890 7 stGUD1.INPUT_SOURCE = ( stGUD1.INPUT_SOURCE & 0xe7) | 0x08;
891 7 Set_Bright_Contrast();
892 7 Save_GUD0();
893 7 Save_GUD1();
894 7 break;
895 7 case 3 : //9300
896 7 stGUD1.INPUT_SOURCE = ( stGUD1.INPUT_SOURCE & 0xe7) | 0x00;
897 7 Set_Bright_Contrast();
898 7 Save_GUD0();
899 7 Save_GUD1();
900 7 break;
901 7 case 4 :
902 7 ucOSD_Item_Index0 = 3;
903 7 ucOSD_Item_Index1 = 0;
904 7 ucOSD_Item_Index2 = 0;
905 7 Show_Mode();
906 7 break;
907 7 }
908 6 break;
909 6 }
910 5 }
911 4 }
912 3 }
913 2 break;
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 16
914 2
915 2 case NOTIFY_RIGHT_KEY : // Right-key to Increase; Left-key to Decrease
916 2 case NOTIFY_LEFT_KEY :
917 2 case NOTIFY_IR_RIGHT_KEY :
918 2 case NOTIFY_IR_LEFT_KEY :
919 2 if (ucOSD_Item_Index1)
920 2 {
921 3 switch (ucOSD_Item_Index0)
922 3 {
923 4 case PAGE1_ITEM_CONTRAST :
924 4 if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
925 4 {
926 5 if (100 <= stGUD0.CONTRAST) break;
927 5
928 5 if (KEY_TURBO_ENABLE > ucKey_Issued)
929 5 stGUD0.CONTRAST = 100 > stGUD0.CONTRAST ? stGUD0.CONTRAST + 1 : 100;
930 5 else
931 5 stGUD0.CONTRAST = 99 > stGUD0.CONTRAST ? stGUD0.CONTRAST + 2 : 100;
932 5 }
933 4 else
934 4 {
935 5 if (0 == stGUD0.CONTRAST) break;
936 5
937 5 if (KEY_TURBO_ENABLE > ucKey_Issued)
938 5 stGUD0.CONTRAST = 0 < stGUD0.CONTRAST ? stGUD0.CONTRAST - 1 : 0;
939 5 else
940 5 stGUD0.CONTRAST = 1 < stGUD0.CONTRAST ? stGUD0.CONTRAST - 2 : 0;
941 5 }
942 4 OSD_Slider(11, 2, 20, stGUD0.CONTRAST, 100, 0x61);
943 4 Set_Bright_Contrast();
944 4 Save_GUD0();
945 4 break;
946 4 case PAGE1_ITEM_BRIGHT :
947 4
948 4 #if (BRIGHT_TYPE == GAIN)
949 4 if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
950 4 {
951 5 if (100 <= stGUD0.BRIGHT) break;
952 5
953 5 if (KEY_TURBO_ENABLE > ucKey_Issued)
954 5 stGUD0.BRIGHT = 100 > stGUD0.BRIGHT ? stGUD0.BRIGHT + 1 : 100;
955 5 else
956 5 stGUD0.BRIGHT = 99 > stGUD0.BRIGHT ? stGUD0.BRIGHT + 2 : 100;
957 5 }
958 4 else
959 4 {
960 5 if (0 == stGUD0.BRIGHT) break;
961 5
962 5 if (KEY_TURBO_ENABLE > ucKey_Issued)
963 5 stGUD0.BRIGHT = 0 < stGUD0.BRIGHT ? stGUD0.BRIGHT - 1 : 0;
964 5 else
965 5 stGUD0.BRIGHT = 1 < stGUD0.BRIGHT ? stGUD0.BRIGHT - 2 : 0;
966 5 }
967 4 OSD_Slider(11, 2, 20, stGUD0.BRIGHT, 100, 0x61);
968 4 #endif
969 4 #if (BRIGHT_TYPE == LIGHT)
if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
{
if (100 <= fac_light) break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
fac_light = 100 > fac_light ? fac_light + 1 : 100;
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 17
else
fac_light = 99 > fac_light ? fac_light + 2 : 100;
}
else
{
if (0 == fac_light) break;
if (KEY_TURBO_ENABLE > ucKey_Issued)
fac_light = 0 < fac_light ? fac_light - 1 : 0;
else
fac_light = 1 < fac_light ? fac_light - 2 : 0;
}
OSD_Slider(11, 2, 20, fac_light, 100, 0x61);
#endif
990 4
991 4 Set_Bright_Contrast();
992 4 Save_GUD0();
993 4 Save_GUD4();
994 4 break;
995 4
996 4 case PAGE1_ITEM_GAMMA :
997 4 if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
998 4 {
999 5 if (4 <= ucOSD_Item_Index2) break;
1000 5
1001 5 ucOSD_Item_Index2 = ucOSD_Item_Index2 + 1;
1002 5 }
1003 4 else
1004 4 {
1005 5 if (1 >= ucOSD_Item_Index2) break;
1006 5
1007 5 ucOSD_Item_Index2 = ucOSD_Item_Index2 - 1;
1008 5 }
1009 4
1010 4 RTDCodeW((4 == ucOSD_Item_Index2) ? OSD_Temp_3
1011 4 : (3 == ucOSD_Item_Index2) ? OSD_Temp_2
1012 4 : (2 == ucOSD_Item_Index2) ? OSD_Temp_1 : OSD_Temp_0);
1013 4
1014 4 break;
1015 4 }
1016 3 }
1017 2 else
1018 2 {
1019 3 if (ucOSD_Item_Index0)
1020 3 {
1021 4 // Select and highlight the next/previous item
1022 4 if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
1023 4 ucOSD_Item_Index0 = (PAGE1_ITEM_NUM == ucOSD_Item_Index0) ? 1 : (ucOSD_Item_Index0 +
- 1);
1024 4 else
1025 4 ucOSD_Item_Index0 = (1 == ucOSD_Item_Index0) ? PAGE1_ITEM_NUM : (ucOSD_Item_Index0 -
- 1);
1026 4
1027 4 OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, 7, COLOR_CYAN);
1028 4 }
1029 3 else
1030 3 {
1031 4 // Change to next/previous main page
1032 4 if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action)
1033 4 ucOSD_Page_Index = GetNextPageIdx(ucOSD_Page_Index);
1034 4 else
1035 4 ucOSD_Page_Index = GetPrevPageIdx(ucOSD_Page_Index);
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 18
1036 4 }
1037 3 }
1038 2 break;
1039 2
1040 2 case NOTIFY_SHOW :
1041 2 Init_Page(0);
1042 2 RTDCodeW(CHINESE == (stGUD1.FUNCTION & 0x07) ? Page1_C_Atb : Page1_E_Atb);
1043 2 RTDCodeW((unsigned char *)OSD_PAGE_TABLE[0][stGUD1.FUNCTION & 0x07]);
1044 2
1045 2 // Highlight the select item
1046 2 OSD_Window(1, (2 + ucOSD_Item_Index0), (2 + ucOSD_Item_Index0), 7, 23, (ucOSD_Item_Index0 ? 7 : 3)
-, COLOR_CYAN);
1047 2
1048 2 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -