⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
    }    // Brian2.81, we treate compound KEY_PLAY_PAUSE/ KEY_PAUSE_STEP as KEY_PAUSE in backdoor    if (_bDoBackDoor)    {        if (__bKey == KEY_PLAY_PAUSE || __bKey == KEY_PAUSE_STEP)            __bKey = KEY_PAUSE;        _ProcessBackDoorKey();        bKeyStatus = KEY_NO_KEY;        return bKeyStatus;    }    else    {        if (__bKey == KEY_PLAY || __bKey == KEY_PLAY_PAUSE)            __bKey = KEY_ENTER;    }    if (__bInputPassword)    {	extern BYTE _bMENUTemp;	if (__wMENUCurrentItemId == SETUP_CUSTOM_CHANGE_PASSWORD)	{            _bMENUTemp = OSDSETUP_ChangePassword(__bKey);            if (_bMENUTemp == SETUP_INPUT_PASSWORD_VERIFIED)            {#ifdef WRITE_EEPROM_ENABLE //SYSTEM_8051                HAL_WriteStorage(SETUP_ADDR_PASSSTRING, (BYTE *)                    &(__SetupInfo.wDefaultPassword), EPROM_PASSSTRING_BYTE);#endif            }            bKeyStatus = KEY_NO_KEY;            return bKeyStatus;	}	else if (__wMENUCurrentItemId == SETUP_CUSTOM_PARENTAL)	{            _bMENUTemp = SETUP_InputPassword(__bKey);            if (_bMENUTemp == SETUP_INPUT_PASSWORD_CORRECT)            {                __bKey = KEY_RIGHT;                _bPasswordOK = TRUE;            }            else            {                __bKey = KEY_NO_KEY;            }        }//Alex1.07a,20031013 SETUP_SHOW_PSCAN_PROMP#ifdef SUPPORT_PSCAN_PROMPT_SETUP           //Alex1.07a 20031009 if current menu is one of pscan,         //  choose support pscan or not                else if (__wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_YUV_PSCAN ||                 __wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_RGB_PSCAN ||		 __wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_VGA) 	{               _bMENUTemp = OSDSETUP_InputPscan(__bKey);	}        #endif //#ifdef SUPPORT_PSCAN_PROMPT_SETUP	else 	{            _bMENUTemp = OSDSETUP_InputLanguageCode(__bKey);            if (_bMENUTemp == SETUP_INPUT_PASSWORD_CORRECT)            {                OSDMENU_MenuOperation(KEY_ENTER);		switch (__wMENUPrevItemId)		{		case SETUP_LANGUAGE_MENU_OTHERS:                    //Save the menu language code to __SetupInfo                    __SetupInfo.wMenuLanguageCode = _GetLanguageNumber();                    //Save the data to EEPROM#ifdef WRITE_EEPROM_ENABLE //SYSTEM_8051                    HAL_WriteStorage(SETUP_ADDR_MENU_LANGUAGE_CODE,                        (BYTE *)&(__SetupInfo.wMenuLanguageCode), 2);#endif                    break;                case SETUP_LANGUAGE_AUDIO_OTHERS:                    //Save the menu language code to __SetupInfo                    __SetupInfo.wAudioLanguageCode = _GetLanguageNumber();#ifdef WRITE_EEPROM_ENABLE //SYSTEM_8051                    HAL_WriteStorage(SETUP_ADDR_AUDIO_LANGUAGE_CODE,                        (BYTE *)&(__SetupInfo.wAudioLanguageCode), 2);#endif                    break;                case SETUP_LANGUAGE_SP_OTHERS:                    //Save the menu language code to __SetupInfo                    __SetupInfo.wSPSTLanguageCode = _GetLanguageNumber();#ifdef WRITE_EEPROM_ENABLE//SYSTEM_8051                    HAL_WriteStorage(SETUP_ADDR_SPST_LANGUAGE_CODE,                        (BYTE *)&(__SetupInfo.wSPSTLanguageCode), 2);#endif                    break;                }                // has been called in the previous _SaveDataToSetupInfo()                _SaveDataToSetupInfo(); // Brian1.07, put it here so when it call _TransferLanguageToSPRM, the __SetupInfo.xxxLanguageCode is correct            } // end if (_bMENUTemp == SETUP_INPUT_PASSWORD_CORRECT)            bKeyStatus = KEY_NO_KEY;	}    }    switch (__bKey)    {    case KEY_SETUP:        if (TRUE == __bMediaSelectUI )        {            bKeyStatus = KEY_INVALID;         }        else        {            if (!__bSetupMode)            {#if defined (SUPPORT_PSCAN_PROMPT_SETUP) || defined (SUPPORT_PSCAN_PROMPT_OSD)                // Brian1.08, when none-setup mode PSCAN prompt dialog is displayed,                // don't enter Setup mode.                if (__bOSDPromptMode)                {                    bKeyStatus = KEY_BYPASS;                    return bKeyStatus;                }#endif//LJY0.76, not support setup in digest play mode.#ifndef NO_DIGEST                if(__btDIGEST) return KEY_BYPASS;#endif                MM_CompleteJPGEffect(TRUE);                _SETUP_ShowUI();            }            else            {                SETUP_Exit(OSD_UI_EXIT_ALL);            }            bKeyStatus = KEY_NO_KEY;         }        break;    case KEY_UP:        OSDMENU_MenuOperation(__bKey);#ifndef REMOVE_SETUP_SPEAKER_TEST		OSDSETUP_ProcessSpeaker();#endif        bKeyStatus = KEY_NO_KEY;        break;    case KEY_DOWN:		OSDMENU_MenuOperation(__bKey);#ifndef REMOVE_SETUP_SPEAKER_TEST		OSDSETUP_ProcessSpeaker();#endif        bKeyStatus = KEY_NO_KEY;        break;#ifdef SUPPORT_SETUP_HORIZONTAL_ICON_MENU    // Brian1.08a, horizontal layout could use STOP key to go to paranet menu    case KEY_STOP:#endif    case KEY_LEFT:#ifndef REMOVE_SETUP_SPEAKER_TEST        if (__wMENUCurrentItemId == SETUP_AUDIO_SPEAKER_TEST)	{            // moving from SPEAKER TEST to AUDIO SETUP            _SETUP_ShowSpeaker(SPEAKER_CLEAR);	}#endif        OSDMENU_MenuOperation(__bKey);#ifndef REMOVE_SETUP_SPEAKER_TEST        if (__wMENUCurrentItemId == SETUP_AUDIO_SPEAKER_TEST)	{            // moving from Auto/Left/Right/.../Subwoofer to SPEAKER TEST            // clear speaker highlight by displaying the picture again            _SETUP_ShowSpeaker(SPEAKER_ALL);            if (_bDSPTestTone)            {            // Mute Test tone            CHIPS_SoftMute();//alan090            UTL_DelayTime(COUNT_50_MSEC, FALSE); // Brian1.23 fix "bo" noise when TestTone --> Exit Setup            _bAudioTypeChange = TRUE;            _bTestToneStage = 0; // set to 0, will not trigger Auto mode stage            }		}#endif        bKeyStatus = KEY_NO_KEY;        break;    case KEY_RIGHT:    case KEY_ENTER:    case KEY_PLAY:          // Brian2.81, CC module doesn't transfer key anymore    case KEY_PLAY_PAUSE:    // Brian2.81, CC module doesn't handle compound keys	if (__wMENUCurrentItemId == SETUP_CUSTOM_PARENTAL && !_bPasswordOK)	{            OSDSETUP_PasswordDlg();	}	else if (__wMENUCurrentItemId == SETUP_CUSTOM_CHANGE_PASSWORD)	{            OSDSETUP_ChangePasswordDlg();	}#ifndef NO_DRM	else if (__wMENUCurrentItemId == SETUP_CUSTOM_DIVX_VOD)	{            OSDDIVX_DrawDialog(DLG_REG_CODE);        }#endif	else if (__wMENUCurrentItemId == SETUP_LANGUAGE_MENU_OTHERS ||                __wMENUCurrentItemId == SETUP_LANGUAGE_AUDIO_OTHERS ||                __wMENUCurrentItemId == SETUP_LANGUAGE_SP_OTHERS)	{            OSDSETUP_LanguageCodeDlg();	}//Alex 1.08,20031013 if CurrentItemId is YUU_PSCAN, RGB_PSCAN , or VGA , show OSDSETUP_PscanDlg#ifdef SUPPORT_PSCAN_PROMPT_SETUP        else if ((__wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_YUV_PSCAN ||                 __wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_RGB_PSCAN ||                 __wMENUCurrentItemId == SETUP_SCREEN_VIDEO_OUTPUT_VGA)     &&                  (__bInputPassword==FALSE  )&&                 (__SetupInfo.bVideoOutput != SETUP_SCREEN_VIDEO_OUTPUT_YUV_PSCAN &&                 __SetupInfo.bVideoOutput != SETUP_SCREEN_VIDEO_OUTPUT_RGB_PSCAN &&                 __SetupInfo.bVideoOutput != SETUP_SCREEN_VIDEO_OUTPUT_VGA)  )	{            __bOSDPromptPreKey=KEY_ACTIVE;            OSDSETUP_ScreenVideoOutputPscanDlg();	}#endif// #ifdef SUPPORT_PSCAN_PROMPT_SETUP	else	{            OSDMENU_MenuOperation(__bKey);#ifndef REMOVE_SETUP_SPEAKER_TEST	// speacial case: when from Root to Item, and the item is "Speaker Test"            if (__wMENUCurrentItemId == SETUP_AUDIO_SPEAKER_TEST)            {                _SETUP_ShowSpeaker(SPEAKER_ALL);                if (_bDSPTestTone)                {                    // Mute Test tone                    CHIPS_SoftMute();                    // fix "bo" noise when TestTone --> Exit Setup//alan090                    UTL_DelayTime(COUNT_50_MSEC, FALSE);                     _bAudioTypeChange = TRUE;                    // set to 0, will not trigger Auto mode stage                    _bTestToneStage = 0;                }            }            else            {                // check if it is one of the speaker test item,                // if it is, do the Test tone                _SpeakerTest();            }#endif	//#ifndef REMOVE_SETUP_SPEAKER_TEST	}	if (__bKey == KEY_ENTER)	{            // save changed value to serial EEPROM            if (!__bInputPassword)             {                // because in Input or Change Password mode,                // the current Item is still the Item not on the Value		// so we don't want and don't need to save the value to EEPROM,                // but there is no protection		// for this in _SaveDataToSetupInfo, so we do the check here.		_SaveDataToSetupInfo();                _SETUP_DrawSelectString(__SetupInfo.bOSDLanguage - SETUP_LANGUAGE_OSD_BASE);            }            if (__wMENUCurrentItemId == SETUP_MAIN_EXIT)            {                SETUP_Exit(OSD_UI_EXIT_ALL);            }	}        bKeyStatus = KEY_NO_KEY;        break;    case KEY_STOP_RETURN:        bKeyStatus =KEY_NO_KEY;        break;    case KEY_TEST1:    case KEY_TEST2:    case KEY_TEST3:    case KEY_TEST4:    case KEY_TEST5:    case KEY_TEST6:    case KEY_TEST7:    case KEY_TEST8:    case KEY_TEST9:    case KEY_I2CTEST:        // these KEYs are for Emulator Test Tool        // we need to pass them out        break;    case KEY_N0:    case KEY_N1:    case KEY_N2:    case KEY_N3:    case KEY_N4:    case KEY_N5:    case KEY_N6:    case KEY_N7:    case KEY_N8:    case KEY_N9:     default:        if (__btPause)        {            bKeyStatus = KEY_NO_KEY;            return bKeyStatus ; //TRUE;        }#ifndef DO_NOT_SUPPORT_BACK_DOOR        if ((_bDoBackDoor == FALSE) && (__wMENUCurrentItemId == BACKDOOR_ENTRY_POINT)) //SETUP_MAIN_LANGUAGE))         {            if  (__bBackDoorSeqIndex == 0)            {                if (__bKey == __bBackDoorSequence[__bBackDoorSeqIndex])                    __bBackDoorSeqIndex++;            }            else if (__bBackDoorSeqIndex < BACK_DOOR_SEQUENCE_NUM)            {                if (__bKey == __bBackDoorSequence[__bBackDoorSeqIndex])                    __bBackDoorSeqIndex++;                else                    __bBackDoorSeqIndex = 0;                if (__bBackDoorSeqIndex == BACK_DOOR_SEQUENCE_NUM)                {                    _bDoBackDoor = TRUE;                    // Set text color for back door case                    _SETUP_StrAttr.bTextColor = OSDMENU_ENTRY_DESC_TEXT_COLOR;                    _SETUP_StrAttr.bBackground = OSDSETUP_ENTRY_CENTER_COLOR_BG;                    if (SETUP_BACK_DOOR_REGION == _bBackDoor[_bBackDoorIndex])                     {                    _bSetupTemp = _ConvertBackDoorRegionNum(__SetupInfo.bRegionControl);                    _SETUP_OutputNumber(BACKDOOR_DISPLAY_X, BACKDOOR_DISPLAY_Y,                                        _bSetupTemp,                                        OSDSETUP_ENTRY_COLOR_TOP_BANNER_TEXT,                                        OSDSETUP_ENTRY_COLOR_TOP_BANNER);                    }                    else // SETUP_BACK_DOOR_DEBUG_MODE                    {                        _bDebugSetMode = FALSE;                        _dwDebugMode = UTL_Get_DebugMode();	                        _bDebugIndex = _GetDebugIndex(_dwDebugMode);                        _dwBackupDebugMode = _dwDebugMode;                                        _ClearVersionRegion();                        _OutputDebugInfo();						                        _SETUP_OutputNumber(BACKDOOR_DISPLAY_X, BACKDOOR_DISPLAY_Y,                            6000 + _bDebugIndex,                            OSDSETUP_ENTRY_COLOR_TOP_BANNER_TEXT,                             OSDSETUP_ENTRY_COLOR_TOP_BANNER);                        						                    }                }            }        }#endif //#ifndef DO_NOT_SUPPORT_BACK_DOOR        bKeyStatus = KEY_NO_KEY;        break;    }    return bKeyStatus;}void SETUP_PartialRedraw(DWORD X0, DWORD Y0, DWORD X1, DWORD Y1){    PARM_RECT RectAttr;    RectAttr.rect.wLeft = X0;     RectAttr.rect.wTop = Y0;     RectAttr.rect.wRight = X1;     RectAttr.rect.wBottom = Y1;     RectAttr.bColor = OSDSETUP_ENTRY_CENTER_COLOR_BG;    GDI_FillRect_909(0, &RectAttr);    OSDSETUP_RedrawMenu();}//  *************************************************************************//  Function    :   SETUP_Recover//  Description :   The function is called by OSD to do the recovery of Program UI//  Arguments   :   bRecoverRegion, the recover region//              :   OSD_RECOVER_ALL//              :   OSD_RECOVER_UPPER_REGION, invalid//              :   OSD_RECOVER_BOTTOM_REGION, invalid//  Return      :   TRUE, The region has been recovered.//              :   FALSE, The region doesn't need to be recovered in this UI.//  Side Effect :

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -