fsGUI_pub.c
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:153k
源码类别:
DVD
开发平台:
C/C++
- * 2004-06-08
- */
- void FSGUI_UpdateInfoArea(BYTE* strInfo)
- {
- #ifdef AUDIO_SHOW_SAVER
- if (bDisableGUI) return;
- #endif
- //update the background,
- //note:avoid redraw the rotating icon and the left and right sides
- //the width of the icon and left side totally are about 45
- #define INFO_STR_XSTART 45
- FSGUI_DrawBackGround(fsArea[FS_AREA_PATHBACKGROUND].xStart + INFO_STR_XSTART,
- fsArea[FS_AREA_PATHBACKGROUND].yStart,
- fsArea[FS_AREA_PATHBACKGROUND].xSize - INFO_STR_XSTART,
- fsArea[FS_AREA_PATHBACKGROUND].ySize,
- LAY_PLAYING_BAR_3_2);
- //show the dir and file playing string
- FSGUI_ShowString(fsArea[FS_AREA_PATHINFO].xStart,
- fsArea[FS_AREA_PATHINFO].yStart, strInfo,
- FS_FONTCOLOR_PATH_Y,
- FS_FONTCOLOR_PATH_CrCb);
- }
- #endif //#if !defined (FS_BMP_GUI)
- void FSGUI_Shuffle()
- {
- // generate a random directory, panxing, 2002-1-22
- // use one while loop to avoid no specify style file in the random directory, panxing, 2002-1-22
- do
- {
- pFsJpeg->fsnav_dir_will = regs0->stc_15_0 % pFsJpeg->fsnav_dir_cnt;
- } while (FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_will), 0));
- pFsJpeg->fsnav_dir_now = pFsJpeg->fsnav_dir_will;
- // generate a random file page, panxing, 2002-1-22
- pFsJpeg->file_page_will = regs0->stc_15_0 % pFsJpeg->File_Page_Count;
- PrepareForChangeFilePage(pFsJpeg->file_page_will, pFsJpeg->file_page_will * PER_PAGE, 2);
- // generate a random file_curent pointer, panxing, 2002-1-22
- pFsJpeg->file_will = regs0->stc_15_0 % pFsJpeg->File_Count;
- pFsJpeg->fsnav_trk_will = pFsJpeg->file_array[pFsJpeg->file_will] - pFsJpeg->first_mp3_entry;
- Will2Playing();
- refresh_file_page = 1;
- refresh_dir_page = 1;
- refresh_dir_icon = 1;
- }
- void FSGUI_JpgUpdateOSD(void)
- {
- #ifdef MP3_DIRECT_SELECT //fengjl edit to update VFD //axel 2003-12-26 14:36 update jpg info on VFD
- disp_trk_now = pFsJpeg->first_mp3_seq + pFsJpeg->file_page_now * PER_PAGE + pFsJpeg->file_current + 1;
- #else
- disp_trk_now = pFsJpeg->file_page_now * PER_PAGE + pFsJpeg->file_current + 1;
- #endif
- if(t_disp)
- {
- DispCookOSD0(1);
- DispPolling(0);
- }
- }
- int FSChkProg(BYTE iPage, BYTE iItem)
- {
- int iRes=0;
- int iFileCount;
- // iPage is not page but directory, panxing, 2002-1-29
- if(iPage > pFsJpeg->count_dir[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3])
- {
- return 0;
- }
- iFileCount = CountSpecifyFile(AnchorDir(iPage-1));
- if(iFileCount == 0)
- {
- iRes = 0;
- }
- else
- {
- if (iItem <= iFileCount)
- {
- iRes = 1;
- }
- }
- return iRes;
- }
- int FSGUI_GetDispTrack()
- {
- int iRes;
- #ifdef MP3_DIRECT_SELECT
- iRes = pFsJpeg->first_mp3_seq + pFsJpeg->file_page_now * PER_PAGE + pFsJpeg->file_current + 1;
- #else
- iRes = pFsJpeg->file_page_now * PER_PAGE + pFsJpeg->file_current + 1;
- #endif
- return iRes;
- }
- void FSGUI_2Last()
- {
- refresh_dir_icon = 1;
- pFsJpeg->fsnav_dir_now = AnchorDir(pFsJpeg->count_dir[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3] - 1);
- pFsJpeg->dir_current = pFsJpeg->count_dir[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3] % PER_PAGE;
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_now), 0);
- FSGUI_FileSelect(pFsJpeg->file_specify_in_dir);
- pFsJpeg->fsnav_dir_will = pFsJpeg->fsnav_dir_now; //Jeff 20020524
- }
- void FSGUI_Refresh(void)
- {
- #if 0
- printf("=============Info of mp3 navigation============n");
- printf("file_current=%3d, file_page_now =%3d, fsnav_trk_now =%3dn", pFsJpeg->file_current, pFsJpeg->file_page_now, pFsJpeg->fsnav_trk_now);
- printf("file_will =%3d, file_page_will =%3d, fsnav_trk_will=%3dn",pFsJpeg->file_will, pFsJpeg->file_page_will, pFsJpeg->fsnav_trk_will);
- printf("File_Count =%3d, File_Page_Count=%3d, file_specify_in_dir=%3dn", pFsJpeg->File_Count, pFsJpeg->File_Page_Count, file_specify_in_dir);
- printf("dir_current =%3d, fsnav_dir_now =%3dn", pFsJpeg->dir_current, pFsJpeg->fsnav_dir_now);
- printf("dir_page_now=%3d, fsnav_dir_will =%3dn", pFsJpeg->dir_page_now, pFsJpeg->fsnav_dir_will);
- printf("refresh_dir_icon=%d,refresh_file_page=%d,refresh_dir_page=%dn",refresh_dir_icon,
- refresh_file_page,refresh_dir_page);
- #endif
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- FSGUI_RotateDiscIcon(0);//solve the problem when enter"return",the disc icon disappeared.zhaoyanhua 3-7-10 15:36
- #endif
- #ifdef FS_BMP_GUI//for display playing or HL Dir
- DirList();
- FSShowDirIcon();
- #else
- DrawButton();
- FSShowDirIcon();
- //refresh_dir_page=1;
- DirList();
- #endif
- ShowFileIcon();
- //refresh_file_page=1;
- FileList();
- SelectHL();
- #ifdef FSGUI_NO_BLINK_SCROLL
- if(up_down_done && (pFsJpeg->ControlArea == CNT_AREA_FILE))
- up_down_done=0;
- else
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will,SCROLLBAR_REFRESH);
- #elif defined (FS_BMP_GUI)
- MoveScroll(pFsJpeg->file_page_now);//show file scroll bar
- DIR_MoveScroll(pFsJpeg->dir_page_now);
- #else
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will);
- #endif
- FSGUI_CookFileItem(pFsJpeg->file_current);
- }
- //
- // FSGUI_Select :
- // return : 0 -> invalid-key or change folder
- // 1 -> valid select
- int FSGUI_Select(int iSelect) // select file range of all disc,panxing,2002-4-8
- {
- int iRes = 1;
- #ifdef RECORD_PER_SECOND //avoid bug when playing mp3 gerry 2-12-3 19:46
- resumeMSF = 0;
- #endif
- if (pFsJpeg->ControlArea == CNT_AREA_DIR)
- {
- if (iSelect > 0 && iSelect <= pFsJpeg->count_dir[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3])
- {
- pFsJpeg->fsnav_dir_will = AnchorDir(iSelect - 1);
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_will), 0);
- pFsJpeg->fsnav_dir_now = pFsJpeg->fsnav_dir_will;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- pFsJpeg->gifsbPreview = 0;//zhaoyanhua add 2004-2-24 17:25
- #else
- pFsJpeg->gifsbPreview = 1;
- #endif
- iRes = 1;
- refresh_dir_icon = 1;
- Restore2PlayingDir();
- #ifdef HANYANG_LR_CHANGE_PAGE
- //When enter in DIR area, right to file area
- FSGUI_Dir2FileArea();
- #endif
- }
- else
- {
- invalid_key();
- iRes = 0;
- }
- }
- else //It is File Area Now
- {
- #if defined(MP3_DIRECT_SELECT)||defined(SUPPORT_CHANGE_FILE_DIR_PAGE)
- if ((iSelect > 0) && (iSelect <= pFsJpeg->count_file[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3]))
- {
- int i, tmp;
- int iCount = 0;
- int oldfsnav_dir_will; //Jeff 20020603
- oldfsnav_dir_will = pFsJpeg->fsnav_dir_will;
- for(i = 0; i < pFsJpeg->fsnav_dir_cnt; i++)
- {
- tmp = CountSpecifyFile(i);
- if((iCount + tmp) >= iSelect)
- break;
- iCount += tmp;
- }
- pFsJpeg->fsnav_dir_will = i;
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_will), 0);
- pFsJpeg->fsnav_dir_now = pFsJpeg->fsnav_dir_will;
- iSelect = iSelect - iCount;
- pFsJpeg->ControlArea = CNT_AREA_FILE; // Robert 20020521
- //Jeff 20020627
- if (pFsJpeg->gifsbZoomOK == 0)
- {
- if (oldfsnav_dir_will != pFsJpeg->fsnav_dir_will)
- {
- refresh_dir_page=1;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //Maoyong changed 2004.03.12, When select a file in other dir, avoid
- //(1)not draw dir in JPEG full screen mode, not destroy decoded graph in Frame Buf 0
- //(2)In preview, can't refresh dir because there is preivewed picture
- //(3)When Other type movie if playing
- if(pFsJpeg->iGraphMode == 0)
- {
- // 2004/04/28 yltseng, add one more condition that should not refresh DirIcon & DirList
- //if( !( pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG || IsOtherStatePlayMode() ) )
- if( ( pFsJpeg->gifsFuncBtn != FS_FUNC_JPEG )
- #ifdef SUPPORT_FILE_SYSTEM_MODE // 2004/06/10 yltseng
- && ( !IsOtherStatePlayMode() )
- #endif
- )
- {
- FSShowDirIcon();
- DirList();
- }
- }
- #else
- FSShowDirIcon();
- DirList();
- #endif
- }
- }
- }
- #endif
- if ((iSelect > 0) && (iSelect <= pFsJpeg->file_specify_in_dir))
- {
- FSGUI_FileSelect(iSelect);
- pFsJpeg->ControlArea = CNT_AREA_FILE; // Robert 20020521
- #if defined(NEW_MP3_GUI ) || defined(FS_BMP_GUI)
- //Maoyong 2004.06.10 for GUI Bug in Preview.
- if( (pFsJpeg->gifsbPreview == 1)&&(pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG) && !pFsJpeg->gbfsSlide )
- {
- #ifdef FS_BMP_GUI//zhaoyanhua dd 2004-6-11 11:21
- ClearJpegPreviewBg();
- #else
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, DIR_STEP, DIR_AREA_BKGROUND_CRCB);
- #endif
- pFsJpeg->gifsbPreview = 0;
- }
- #endif
- //wanghaoying add 2003-11-10 17:16
- //Des: VFD show the number selected
- if(!(full_scrn&GOTO))
- disp_trk_now = iSelect;
- iRes = 1;
- return 1;
- }
- else
- invalid_key();
- iRes = 0;
- }
- return iRes;
- }
- void FSGUI_Stop()
- {
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_now), 0);
- #ifdef NEW_MP3_GUI
- if (JPEG_Preview_drawed == JPEG_PREVIEW_IN_DIR_AREA )
- {
- ClearJpegPreviewBg();//zhaoyanhua changed 2004-6-11 11:29
- //DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, 40, DIR_AREA_BKGROUND_CRCB);
- //JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA ;
- }
- #endif
- refresh_dir_page = 1; // insure dir page area can be refresh, panxing, 2002-1-22
- refresh_file_page = 1;
- FSGUI_Refresh();
- #if !(defined (NEW_MP3_GUI) || defined (FS_BMP_GUI))
- ClearArea(FS_AREA_PREVIEWJPG);
- #endif
- if ((pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_GAME)
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER)
- #endif
- )
- {
- pFsJpeg->file_current = 0;
- pFsJpeg->file_will = 0;
- pFsJpeg->dir_current = 0;
- pFsJpeg->fsnav_dir_will = 0;
- pFsJpeg->fsnav_dir_now = 0;
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_now), 0);
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- if (!(pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)) //when show JPEG,STOP should not change pFsJpeg->gifsbPreview.zhaoyanhua 3-7-9 9:08
- #endif
- pFsJpeg->gifsbPreview = 1;
- }
- FSGUI_JpgUpdateOSD();
- }
- //
- // Draw mp3 main menu, fill framebuf by some difference color
- //
- void FSGUI_Menu()
- {
- #ifdef AUDIO_SHOW_SAVER
- if (bDisableGUI) return;
- #endif
- refresh_dir_page=1;
- refresh_file_page=1;
- //suqiaoli add 2004-10-10 ,solve FS_BMP_GUI LOGO mosaic bug ,
- //move set_disbuf_now(0) from fs9660.c ReadFile Function.
- #if defined (MP3_LARGE_GUI) || defined (FS_BMP_GUI)
- set_disbuf_now(0);
- #endif
- #ifdef NEW_MP3_GUI
- // background
- #ifdef MP3_LARGE_GUI
- FSGUI_FillFrameBuf(0,0, 720, 480, BK_GROUNDY,BK_CRCB);
- #else
- FSGUI_FillFrameBuf(0,0,352,288,BK_GROUNDY,BK_CRCB);
- #endif
- #ifdef MONO_FSGUI //FS GUI, axel 2003-12-29 23:26
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1,1, DIR_AREA_BKGROUND_CRCB);
- DrawRectCorner(Rect[FILE_RECT], CORNER_RAD, 1, 1, FILE_AREA_BKGROUND_CRCB);
- #else
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1,DIR_STEP, DIR_AREA_BKGROUND_CRCB);
- DrawRectCorner(Rect[FILE_RECT], CORNER_RAD, 1, FILE_STEP, FILE_AREA_BKGROUND_CRCB);
- #endif
- DrawButton();//to avoid GUI blinking zhaoyanhua add 2004-2-3 16:09
- #elif defined FS_BMP_GUI
- // show background
- FSGUI_DrawBackGround(BG_XSTART, BG_YSTART + 0, BG_XREPEAT, BG_YREPEAT,LAY_BG_3_1);
- FSGUI_DrawBackGround(BG_XSTART, BG_YSTART + 0xaa, BG_XREPEAT, BG_YREPEAT,LAY_BG_3_2);
- FSGUI_DrawBackGround(BG_XSTART, BG_YSTART + 0x17d, BG_XREPEAT, BG_YREPEAT, LAY_BG_3_3);
- // dir background and file background
- FSGUI_ShowBmpCornerRect(DIR_AREA_XSTART, DIR_AREA_YSTART, DIR_AREA_XLEN, DIR_AREA_YLEN);
- FSGUI_ShowBmpCornerRect(FILE_AREA_XSTART, FILE_AREA_YSTART, FILE_AREA_XLEN, FILE_AREA_YLEN);
- DrawButton();//show top buttons,add by feeling 2004-06-14
- //draw the left and right edge of the info area
- FSGUI_LayoutBmp(LAY_PLAYING_BAR_3_1);
- FSGUI_LayoutBmp(LAY_PLAYING_BAR_3_3);
- //draw the info area background
- FSGUI_DrawBackGround(fsArea[FS_AREA_PATHBACKGROUND].xStart ,
- fsArea[FS_AREA_PATHBACKGROUND].yStart,
- fsArea[FS_AREA_PATHBACKGROUND].xSize,
- fsArea[FS_AREA_PATHBACKGROUND].ySize,
- LAY_PLAYING_BAR_3_2);
- #else //NEW_MP3_GUI
- // background
- FSGUI_FillFrameBuf(0,0,352,288,BK_GROUNDY,BK_GROUNDCRCB);
- // high line
- FSGUI_FillFrameBuf(0,Y1,352,LIGHT_WID,WHITE_Y,WHITE_CRCB);
- FSGUI_FillFrameBuf(0, Y1+LIGHT_WID,
- X1, SHADOW_WID,
- BLACK_Y, BLACK_CRCB);
- FSGUI_FillFrameBuf(X1+LIGHT_WID+SHADOW_WID, Y1+LIGHT_WID,
- 352-X1-LIGHT_WID-SHADOW_WID, SHADOW_WID,
- BLACK_Y, BLACK_CRCB);
- FSGUI_FillFrameBuf(0, Y3,
- X1, LIGHT_WID,
- WHITE_Y,WHITE_CRCB);
- FSGUI_FillFrameBuf(X1+LIGHT_WID+SHADOW_WID, Y3,
- 352-X1-LIGHT_WID-SHADOW_WID, LIGHT_WID,
- WHITE_Y,WHITE_CRCB);
- FSGUI_FillFrameBuf(0, Y3+LIGHT_WID,
- 352, SHADOW_WID,
- BLACK_Y,BLACK_CRCB);
- FSGUI_FillFrameBuf(X1, Y1+LIGHT_WID,
- LIGHT_WID, Y3-Y1,
- WHITE_Y,WHITE_CRCB);
- FSGUI_FillFrameBuf(X1+LIGHT_WID, Y1+LIGHT_WID,
- SHADOW_WID, Y3-Y1-LIGHT_WID,
- BLACK_Y,BLACK_CRCB);
- DrawScroll();
- #endif //NEW_MP3_GUI
- #ifndef AUDIO_SHOW_SAVER
- play_state = VCD_STATE_MP3_FILELIST;
- #endif
- #ifdef DISP_REGION_BOTTOM
- {
- if(t_disp)
- {
- osd_init();
- DispCookOSD0(1);//feeling, update the disp buf,2004/12/30
- }
- }
- #endif
- }
- UINT32 FSGUI_IsSelectable()
- {
- //Jeff 20020521
- if (((pFsJpeg->ControlArea == CNT_AREA_MP3BUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MP3)) ||
- (pFsJpeg->ControlArea==CNT_AREA_JPEGBUTTON) ||
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- (pFsJpeg->ControlArea==CNT_AREA_GAMEBUTTON) ||
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- (pFsJpeg->ControlArea==CNT_AREA_OTHERBUTTON) ||
- #endif
- #ifdef SUPPORT_MIDI
- (pFsJpeg->ControlArea==CNT_AREA_MIDIBUTTON) ||
- #endif
- (pFsJpeg->ControlArea == CNT_AREA_DIR)
- )
- {
- return 1;
- } else
- return 0;
- }
- void FSGUI_JpgPreview()
- {
- UINT32 msf, len;
- int iResJPG;
- #ifdef MP3_JPEG_COWORK
- int last_file_pressed; //ycwen 2005/1/21 for JPEG Preview GUI
- #endif
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //refresh file list, not refresh dir list
- FSGUI_RotateDiscIcon(0);//solve the problem when enter"return",the disc icon disappeared.zhaoyanhua 3-7-10 15:36
- FSGUI_CookFileItem(pFsJpeg->file_current);
- //ShowHL();
- ShowCurrentFilePlaying();
- ShowHL();//zhaoyanhua move it here. 2004-2-2 17:24
- #if defined (FS_BMP_GUI)
- if (flagRefresh == 1)//when return from refresh,show file scroll
- {
- MoveScroll(pFsJpeg->file_page_will);
- flagRefresh = 0;
- }
- else if (pFsJpeg->file_current % PER_PAGE == 0)
- MoveScroll(pFsJpeg->file_page_will);
- #else
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will);
- #endif
- #else
- ClearArea(FS_AREA_PREVIEWJPG);
- // list directories and files, scroll bar,etc, panxing, 2002-1-22
- FSGUI_Refresh();
- #endif
- disp_trk_now = FSGUI_GetDispTrack(); //Jeff 20020607
- FSGUI_JpgUpdateOSD();// same as dvdcode0115, panxing, 2002-1-19
- msf = iso9660_file[pFsJpeg->file_array[pFsJpeg->file_current]].loc;
- len = iso9660_file[pFsJpeg->file_array[pFsJpeg->file_current]].size;
- ClearCommand();
- #if defined (NEW_MP3_GUI)
- if (JPEG_Preview_drawed == DIR_LIST_IN_DIR_AREA )
- {
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, 0,PREVIEW_BKGROUND_CRCB);
- JPEG_Preview_drawed = JPEG_PREVIEW_IN_DIR_AREA ;
- }
- else //not redraw all the background to avoid blinkling when preview picture. zhaoyanhua note
- FSGUI_FillFrameBuf(Rect[ PREVIEW_RECT].xStart, Rect[ PREVIEW_RECT].yStart,
- Rect[ PREVIEW_RECT].xSize, Rect[ PREVIEW_RECT].ySize,
- PREVIEW_BKGROUND_Y, PREVIEW_BKGROUND_CRCB);
- #elif defined FS_BMP_GUI
- ClearJpegPreviewBg();
- if (JPEG_Preview_drawed == DIR_LIST_IN_DIR_AREA )
- {
- JPEG_Preview_drawed = JPEG_PREVIEW_IN_DIR_AREA ;
- //when preview jpg pic,dir scroll bar cannot exit.
- DIR_DrawScroll();
- }
- #endif
- #ifdef MP3_JPEG_COWORK
- last_file_pressed = pFsJpeg->file_current; //ycwen 2005/1/21 Show highlight correctly when press UP/DOWN quickly when preview jpg
- while(check_input_interval()==0)
- {
- if((pFsJpeg->gifsFuncBtn==FS_FUNC_MP3)&&(back_sign==1))
- {
- //FSGUI_Refresh();//refresh the mp3 GUI
- return;//prevent conflict between JPEG and mp3
- }
- polling();
- if(last_file_pressed!=pFsJpeg->file_current)
- {
- SelectHL();
- last_file_pressed = pFsJpeg->file_current;
- }
- //for the msf and len of current jpeg pic
- msf = iso9660_file[pFsJpeg->file_array[pFsJpeg->file_current]].loc;
- len = iso9660_file[pFsJpeg->file_array[pFsJpeg->file_current]].size;
- }
- //pFsJpeg->gifsbPreview = 0;//prevent next enter!//wuxiaofeng marked 2004-04-19
- //ycwen 2005/1/31 If user switch to NONE-JPEG Area, then we should STOP the Jpeg function.
- // (For example, if user switch to MPEG file, and Jpeg still call decode function, then system will reset)
- if (! ((pFsJpeg->ControlArea==CNT_AREA_JPEGBUTTON)||(pFsJpeg->ControlArea==CNT_AREA_FILE)) )
- return;
- #endif
- #ifdef NEW_MP3_GUI
- // joshua, 2004/10/18, added for clearing special-effect mode
- #ifdef JPG_EFFECT
- Jpg_effect_mode = 0;
- #endif
- iResJPG = Jpg_Main(msf, len,
- Rect[SHOW_JPEG_RECT].xStart,
- Rect[SHOW_JPEG_RECT].yStart,
- Rect[SHOW_JPEG_RECT].xSize,
- Rect[SHOW_JPEG_RECT].ySize);
- #elif defined FS_BMP_GUI//zhaoyanhua 2004-6-11 9:04
- iResJPG = Jpg_Main(msf, len,
- fsArea[FS_AREA_PREVIEWJPG].xStart, //x must be 8*x
- fsArea[FS_AREA_PREVIEWJPG].yStart, //y must be 2*x
- fsArea[FS_AREA_PREVIEWJPG].xSize,
- fsArea[FS_AREA_PREVIEWJPG].ySize);
- #else
- iResJPG = Jpg_Main(msf, len,
- fsArea[FS_AREA_PREVIEWJPG].xStart+2, //x must be 8*x
- fsArea[FS_AREA_PREVIEWJPG].yStart+2, //y must be 2*x
- fsArea[FS_AREA_PREVIEWJPG].xSize-4,
- fsArea[FS_AREA_PREVIEWJPG].ySize-4);
- #endif
- #ifdef NOT_SHOW_X_WHEN_JPEG_ERROR //Juse as the name!Jack added 04/11/16
- #ifdef MP3_JPEG_COWORK
- if(pFsJpeg->gifsFuncBtn!=FS_FUNC_MP3)
- #endif
- {
- if (iResJPG < 0)
- {
- psprintf(RegionValStr[REGION1],"JPEG ERROR");
- PrintOsdMsg(STR_OS_SPACE,REGION1,1,1);
- }
- }
- #else
- #ifdef MP3_JPEG_COWORK//prevent drawing the X when switching to mp3
- if(pFsJpeg->gifsFuncBtn!=FS_FUNC_MP3)
- #endif
- {
- #if defined (NEW_MP3_GUI)
- //Maoyong 2004.04.19 for JPEG preview display and flow bug.
- if (iResJPG < 0)
- {
- if(pFsJpeg->ControlArea != CNT_AREA_DIR) //Maoyong 2004.03.11
- {
- BYTE x = 90, y = 140;
- //wanghaoying 2004-8-4 20:48, only for different defination
- #ifdef MP3_LARGE_GUI
- x = 140; y = 240;
- #endif
- // deal with error, panxing, 2002-1-22
- #if (defined(BBK_DVD)||defined(YADAI_DVD))//2004-3-30 16:30 LIJD
- FSGUI_ShowString(90,140,"", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- #else
- FSGUI_ShowString(90,140,"X", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- #endif
- }
- }
- #else
- if (iResJPG < 0) {
- // deal with error, panxing, 2002-1-22
- FSGUI_ShowString(fsArea[FS_AREA_PREVIEWJPG].xStart+(fsArea[FS_AREA_PREVIEWJPG].xSize-10)/2,
- fsArea[FS_AREA_PREVIEWJPG].yStart+(fsArea[FS_AREA_PREVIEWJPG].ySize-12)/2,
- "X", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- }
- #endif
- }
- #endif //end #ifdef NOT_SHOW_X_WHEN_JPEG_ERROR
- }
- UINT32 FSGUI_CmdPlay()
- {
- UINT32 iRes;
- iRes = CMD_FUNC | CMD_FUNC_PLAY;
- //Jeff 20020418
- if ((pFsJpeg->ControlArea==CNT_AREA_MP3BUTTON) || (pFsJpeg->ControlArea==CNT_AREA_JPEGBUTTON)
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- || (pFsJpeg->ControlArea==CNT_AREA_GAMEBUTTON)
- #endif
- )
- {
- iRes = FSGUI_CmdEnter();
- return iRes;
- }//NONO 2-4-2 18:09
- //#endif
- if (pFsJpeg->ControlArea == CNT_AREA_DIR) {
- iRes = FSGUI_CmdEnter();
- return iRes;
- }
- if ((pFsJpeg->ControlArea == CNT_AREA_FILE) && ((pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_GAME)
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER) // Robert 021007
- #endif
- #ifdef SUPPORT_MIDI
- || (pFsJpeg->gifsFuncBtn==FS_FUNC_MIDI)
- #endif
- ))
- {
- iRes = FSGUI_CmdEnter();
- return iRes;
- }
- if (((pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)
- #ifdef SUPPORT_MIDI
- || (pFsJpeg->gifsFuncBtn==FS_FUNC_MIDI)
- #endif
- )
- && (play_state != VCD_STATE_MP3_FILELIST))
- {
- sys_cmd = 0;
- iRes=0;
- }
- else if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- {
- #ifdef MENU_STOP_EXCHANGE
- #ifndef SDRAM_16Mb_Mode
- if(pFsJpeg->ControlArea != CNT_AREA_OTHERBUTTON)
- pFsJpeg->g_nJpegMode=JPEG_THUMBNAIL_MODE; //xulf 2003-12-6
- #endif
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- if(pFsJpeg->ControlArea != CNT_AREA_OTHERBUTTON)
- #endif//nono 20040109
- {
- pFsJpeg->gbfsSlide = 1;
- #ifdef NOT_SHOW_PIC_READ_RATE//terry,2004/1/8 06:33PM
- extern const UINT8 pic_cd_str[17];//axel 2004/5/17 09:45
- if( (strncmp(RegionValStr[REGION1], pic_cd_str, 15) != 0)||(timeout_osd[REGION1]==0) )
- #endif
- {
- PrintOsdMsg(STR_OS_SEQUENCE,REGION1,1,0);
- }
- if (rep_mode==REPEAT_TRACK) {
- rep_mode = 0;
- }
- }
- #ifdef SUPPORT_FILE_SYSTEM_MODE//nono 20040109
- else//if(pFsJpeg->ControlArea != CNT_AREA_OTHERBUTTON )
- {
- iRes = FSGUI_CmdEnter();
- return iRes;
- }
- #endif//#ifdef SUPPORT_FILE_SYSTEM_MODE
- }
- return iRes;
- }
- void Will2Playing(void)
- {
- #ifdef POWER_RESUME
- if ( IsTheSameMP3 ( ) )
- {
- pFsJpeg -> fsnav_trk_will = ReadSameMP3Para ( 1 ) ;
- pFsJpeg -> file_will = pFsJpeg->fsnav_trk_will % PER_PAGE ;
- pFsJpeg -> file_page_will = pFsJpeg->fsnav_trk_will / PER_PAGE ;
- }
- /* read the dir recorded in i2c , and set file_will and file_page_will ,
- added by caiyh , 14:12 , Nov 5th , 2004 */
- #endif // POWER_RESUME
- pFsJpeg->file_current = pFsJpeg->file_will;
- pFsJpeg->file_page_now = pFsJpeg->file_page_will;
- pFsJpeg->fsnav_trk_now = pFsJpeg->fsnav_trk_will;
- }
- void Playing2Will(void)
- {
- pFsJpeg->file_will = pFsJpeg->file_current;
- pFsJpeg->file_page_will = pFsJpeg->file_page_now;
- pFsJpeg->fsnav_trk_will = pFsJpeg->fsnav_trk_now;
- }
- void Restore2PlayingFile(void)
- {
- if (pFsJpeg->file_page_now != pFsJpeg->file_page_will)
- {
- pFsJpeg->file_page_will = pFsJpeg->file_page_now;
- PrepareForChangeFilePage(pFsJpeg->file_page_now, pFsJpeg->fsnav_trk_now, 2);
- if ((pFsJpeg->gifsState != FS_STATE_JPEG) || (pFsJpeg->gifsState != FS_STATE_GAME))
- {
- ShowFileIcon();
- FileList();
- }
- }
- Playing2Will();
- }
- void Restore2PlayingDir(void)
- {
- int playing;
- int will;
- playing = antiAnchorDir(pFsJpeg->fsnav_dir_now);
- will = antiAnchorDir(pFsJpeg->fsnav_dir_will);
- // for restore dir hl's location, panxing, 2002-4-12
- if ((will / PER_PAGE) != (playing / PER_PAGE))
- {
- // in different dir page,panxing,2002-4-12
- CalcDirNow(&(pFsJpeg->fsnav_dir_now));
- if ((pFsJpeg->gifsState != FS_STATE_JPEG) && (pFsJpeg->gifsState != FS_STATE_GAME))
- {
- FSShowDirIcon();
- DirList();
- }
- }
- pFsJpeg->dir_current = playing % PER_PAGE;
- pFsJpeg->fsnav_dir_will = pFsJpeg->fsnav_dir_now;
- }
- UINT32 FSGUI_CmdRight()
- {
- UINT32 iRes=0;
- #ifdef MP3_JPEG_COWORK
- old_time=get_stc_32_inline();//get the press time
- #endif
- if (pFsJpeg->gifsState == FS_STATE_JPEG)
- {
- #ifdef JPG_EFFECT
- sys_cmd = (CMD_SELECT | CMD_FUNC_GAME_R);
- #else
- sys_cmd = iRes;
- #endif
- return sys_cmd;
- }
- if (pFsJpeg->ControlArea == CNT_AREA_FILE)
- {
- #ifdef SUPPORT_MIDI
- if (pFsJpeg->gifsMidiCount)
- pFsJpeg->ControlArea = CNT_AREA_MIDIBUTTON;
- else
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- else
- #endif
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- if (pFsJpeg->gifsGAMECount)
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- else
- #endif
- if (pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- else
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- }
- else if(pFsJpeg->ControlArea == CNT_AREA_DIR)
- {
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- pFsJpeg->gifsbPreview = 1; //Maoyong 2004.05.31
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA;
- //pFsJpeg->gifsbPreview = 1;
- #endif
- }
- else if (pFsJpeg->ControlArea == CNT_AREA_MP3BUTTON)
- {
- if (pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if (pFsJpeg->gifsGAMECount)
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- else if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- #endif
- #ifdef SUPPORT_MIDI
- else if (pFsJpeg->gifsMidiCount)
- pFsJpeg->ControlArea = CNT_AREA_MIDIBUTTON;
- #endif
- else
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- }
- else if (pFsJpeg->ControlArea == CNT_AREA_JPEGBUTTON)
- {
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- if (pFsJpeg->gifsGAMECount)
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- else
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- else
- #endif
- #ifdef SUPPORT_MIDI
- if(pFsJpeg->gifsMidiCount)
- pFsJpeg->ControlArea = CNT_AREA_MIDIBUTTON;
- else
- #endif
- {
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA;
- pFsJpeg->gifsbPreview = 1;
- #endif
- }
- }
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if (pFsJpeg->ControlArea == CNT_AREA_GAMEBUTTON)
- {
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- else
- #endif
- {
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- if (pFsJpeg->g_nJpegMode == JPEG_NORMAL_MODE)
- pFsJpeg->gifsbPreview = 1;
- #endif
- }
- }
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- else if (pFsJpeg->ControlArea == CNT_AREA_OTHERBUTTON)
- {
- #ifdef SUPPORT_MIDI
- if (pFsJpeg->gifsMidiCount)
- pFsJpeg->ControlArea = CNT_AREA_MIDIBUTTON;
- else
- #endif
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- }
- #endif
- #ifdef SUPPORT_MIDI
- else if (pFsJpeg->ControlArea == CNT_AREA_MIDIBUTTON)
- {
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- }
- #endif
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //avoid GUI blinking.zhaoyanhua add 2004-2-3 11:16
- //SelectHL();
- ShowHL();
- #else
- SelectHL();
- #endif
- iRes = 0x20000 | sys_cmd;
- sys_cmd = 0;
- return iRes;
- }
- //Maoyong 2004.05.31 for clear JPEG Preview Background
- void ClearJpegPreviewBg(void)
- {
- #ifdef NEW_MP3_GUI
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, 40, DIR_AREA_BKGROUND_CRCB);
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA;
- #elif defined (FS_BMP_GUI)//zhaoyanhua add 2004-6-11 10:47
- int i = 0;
- FSGUI_DrawBackGround(fsArea[FS_AREA_DIRITEM].xStart + 8,
- fsArea[FS_AREA_DIRITEM].yStart - 12 ,
- fsArea[FS_AREA_DIRITEM].xSize- 16,
- 1,LAY_FILE_BG_10_0);
- for (i = 0; i < 8; i++)//8 sections
- {
- //clear from the position of icon.
- FSGUI_DrawBackGround(fsArea[FS_AREA_DIRITEM].xStart,
- fsArea[FS_AREA_DIRITEM].yStart + 32 * i ,
- fsArea[FS_AREA_DIRITEM].xSize,
- 1,
- LAY_FILE_BG_10_1 + i );
- }
- FSGUI_DrawBackGround(fsArea[FS_AREA_DIRITEM].xStart + 8,
- fsArea[FS_AREA_DIRITEM].yStart + 32 * 8 ,
- fsArea[FS_AREA_DIRITEM].xSize - 16,
- 1,LAY_FILE_BG_10_9);
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA;
- #else
- ClearArea(FS_AREA_PREVIEWJPG);
- #endif
- }
- //Maoyong 2004.07.01 when in JPEG state, enter DIR area should refresh for newer GUI types
- void FSGUI_ChkJpgStRedrawDirArea(void)
- {
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- if( (pFsJpeg->gifsState == FS_STATE_LIST)
- && (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- )
- {
- //Maoyong changed 2004.03.13.When exit preview to DIR, directly clear preview bground.
- //Avoid Bug:Rapid Operation will make DIR bground has preview bground in part.
- //The Bug will happen when picture take long time to show, user enter L/R rapidly
- pFsJpeg->gifsbPreview = 0;
- #if !defined (FS_BMP_GUI)
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, 40, DIR_AREA_BKGROUND_CRCB);
- #endif
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA;
- refresh_dir_icon = 1;
- FSShowDirIcon();
- refresh_dir_page = 1;
- #ifdef FS_BMP_GUI
- DIR_MoveScroll(pFsJpeg->dir_page_now);//show dir scroll bar
- #endif
- DirList();
- ShowCurrentDirPlaying();
- }
- #endif //#if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- }
- #ifdef HANYANG_LR_CHANGE_PAGE
- //Maoyong for hanyang 2004.07.01
- void FSGUI_Dir2FileArea(void)
- {
- //When enter in DIR area, enter/select right to file area
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- ShowHL();
- #else
- SelectHL();
- #endif
- }
- void FSGUI_File2DirArea(void)
- {
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- FSGUI_ChkJpgStRedrawDirArea();
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- ShowHL();
- #else
- SelectHL();
- #endif
- }
- #endif //HANYANG_LR_CHANGE_PAGE
- void FSGUI_FileAreaUpdownRefresh(void)
- {
- if ((pFsJpeg->gifsState == FS_STATE_LIST) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MP3))
- {
- Will2Playing();
- pFsJpeg->gifsbPreview = 1;
- }
- #ifdef FSGUI_NO_BLINK_SCROLL
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will,SCROLLBAR_UP);
- up_down_done=1;
- #elif !defined(FS_BMP_GUI)
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will);
- #endif
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- {
- _JPGBreak();
- jpg_break_up_down = 1; //Maoyong 2004.05.19
- //Maoyong 2004.05.31,when IR up/down, should clear current preview picture
- #ifdef NEW_MP3_GUI
- FSGUI_FillFrameBuf(Rect[ PREVIEW_RECT].xStart, Rect[ PREVIEW_RECT].yStart,
- Rect[ PREVIEW_RECT].xSize, Rect[ PREVIEW_RECT].ySize,
- PREVIEW_BKGROUND_Y, PREVIEW_BKGROUND_CRCB);
- #else
- #if !defined (FS_BMP_GUI)
- ClearArea(FS_AREA_PREVIEWJPG);
- #endif
- #endif
- }
- }
- UINT32 FSGUI_CmdLeft()
- {
- UINT32 iRes=0;
- #ifdef MP3_JPEG_COWORK
- old_time=get_stc_32_inline();//get the press time
- #endif
- if (pFsJpeg->gifsState == FS_STATE_JPEG)
- {
- #ifdef JPG_EFFECT
- sys_cmd = (CMD_SELECT | CMD_FUNC_GAME_L);
- #else
- sys_cmd = iRes;
- #endif
- return sys_cmd;
- }
- if (pFsJpeg->ControlArea == CNT_AREA_FILE)
- {
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- FSGUI_ChkJpgStRedrawDirArea();
- iRes = 0x20000 | sys_cmd;
- sys_cmd = 0;
- }
- else if (pFsJpeg->ControlArea == CNT_AREA_DIR)
- {
- if (pFsJpeg->gifsMP3Count)
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- else if (pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if (pFsJpeg->gifsGAMECount)
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 020930
- else if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- #endif
- #ifdef SUPPORT_MIDI
- else if (pFsJpeg->gifsMidiCount)
- pFsJpeg->ControlArea = CNT_AREA_MIDIBUTTON;
- #endif
- }
- else if (pFsJpeg->ControlArea == CNT_AREA_MP3BUTTON)
- {
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- FSGUI_ChkJpgStRedrawDirArea();
- }
- else if(pFsJpeg->ControlArea == CNT_AREA_JPEGBUTTON)
- {
- if (pFsJpeg->gifsMP3Count)
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- else
- {
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- FSGUI_ChkJpgStRedrawDirArea();
- }
- }
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if(pFsJpeg->ControlArea == CNT_AREA_GAMEBUTTON)
- {
- if (pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- else if (pFsJpeg->gifsMP3Count)
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- else
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- }
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 020930
- else if (pFsJpeg->ControlArea == CNT_AREA_OTHERBUTTON)
- {
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- if (pFsJpeg->gifsGAMECount)
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- else
- #endif
- if (pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- else if (pFsJpeg->gifsMP3Count)
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- else
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- }
- #endif
- #ifdef SUPPORT_MIDI
- else if (pFsJpeg->ControlArea == CNT_AREA_MIDIBUTTON)
- {
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- if (pFsJpeg->gifsOtherCount)
- pFsJpeg->ControlArea = CNT_AREA_OTHERBUTTON;
- else
- #endif
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- if (pFsJpeg->gifsGAMECount) //axel modified 2004/7/28
- pFsJpeg->ControlArea = CNT_AREA_GAMEBUTTON;
- else
- #endif
- if(pFsJpeg->gifsJPEGCount)
- pFsJpeg->ControlArea = CNT_AREA_JPEGBUTTON;
- else if(pFsJpeg->gifsMP3Count)
- pFsJpeg->ControlArea = CNT_AREA_MP3BUTTON;
- else
- pFsJpeg->ControlArea = CNT_AREA_DIR;
- }
- #endif //SUPPORT_MIDI
- #ifdef MP3_TXT_DISPLAY//zhaoyanhua add 2003-9-1 17:49
- if ((MP3_Lyrics_Drawed == MP3_LYRICS_IN_DIR_AREA)
- && (pFsJpeg->ControlArea == CNT_AREA_DIR)
- && (pFsJpeg->gifsFuncBtn == FS_FUNC_MP3))
- {
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, DIR_STEP, DIR_AREA_BKGROUND_CRCB);
- refresh_dir_icon = 1;
- FSShowDirIcon();
- refresh_dir_page = 1;
- DirList();
- MP3_Lyrics_Drawed = DIR_LIST_IN_DIR_AREA;
- }
- #endif/*MP3_TXT_DISPLAY*/
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //avoid GUI blinking.zhaoyanhua 2004-2-2 16:25
- //SelectHL();
- ShowHL();
- #else
- SelectHL();
- #endif
- iRes = 0x20000 | sys_cmd;
- sys_cmd = 0;
- return iRes;
- }
- UINT32 FSGUI_CmdDown()
- {
- UINT32 iRes=0;
- #ifdef MP3_JPEG_COWORK
- old_time=get_stc_32_inline();//get the press time
- #endif
- if (pFsJpeg->gifsState == FS_STATE_JPEG)
- {
- #ifdef JPG_EFFECT
- sys_cmd = (CMD_SELECT | CMD_FUNC_GAME_DN);
- #else
- sys_cmd = iRes;
- #endif
- return sys_cmd;
- }
- if ((pFsJpeg->ControlArea == CNT_AREA_FILE)) {
- if (pFsJpeg->file_will < (pFsJpeg->File_Count - 1))
- {
- // needn't change file page,panxing,2002-4-15
- (pFsJpeg->file_will)++;
- pFsJpeg->fsnav_trk_will = pFsJpeg->file_array[pFsJpeg->file_will] - pFsJpeg->first_mp3_entry;
- }
- else
- {
- // change file page now, panxing, 2002-4-15
- if (pFsJpeg->file_page_will < (pFsJpeg->File_Page_Count - 1))
- {
- pFsJpeg->file_page_will++;
- PrepareForChangeFilePage(pFsJpeg->file_page_will, 0, 0);
- ShowFileIcon();
- FileList();
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- ShowCurrentFilePlaying();//if refresh page, must redraw the current file playing .zhaoyanhua add 2004-2-3 9:12
- #ifdef FS_BMP_GUI
- MoveScroll(pFsJpeg->file_page_will);
- #endif
- #endif
- }
- //when show last file in a dir,down button can't use,suqiaoli add 2004-10-9
- #if defined(FSGUI_NO_BLINK_SCROLL) || defined (FS_BMP_GUI)
- else
- {
- invalid_key(); //xulf
- sys_cmd = iRes;
- return iRes;
- }
- #endif
- }
- #ifdef MP3_LARGE_GUI
- if ((pFsJpeg->gifsState == FS_STATE_LIST) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MP3))
- {
- Will2Playing(); // do preview, panxing,2002-4-15
- pFsJpeg->gifsbPreview = 1;
- }
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will);
- #else
- FSGUI_FileAreaUpdownRefresh();
- #endif
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_DN;
- iRes = 0x20000|sys_cmd;
- sys_cmd = 0; //avoid to receive another sys_cmd when out mainloop,panxing,2002-4-13
- #ifdef MP3_LARGE_GUI
- //Jeff 20020509
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- {
- _JPGBreak();
- jpg_break_up_down = 0x20; //Maoyong 2004.04.19, down break preview flag
- FSGUI_FillFrameBuf(Rect[ PREVIEW_RECT].xStart, Rect[ PREVIEW_RECT].yStart,
- Rect[ PREVIEW_RECT].xSize, Rect[ PREVIEW_RECT].ySize,
- PREVIEW_BKGROUND_Y, PREVIEW_BKGROUND_CRCB);
- }
- #endif
- } else if (pFsJpeg->ControlArea == CNT_AREA_DIR) {
- if (pFsJpeg->fsnav_dir_will < (pFsJpeg->fsnav_dir_cnt - 1))
- {
- pFsJpeg->fsnav_dir_will++;
- FSGUI_PreFindDir(&(pFsJpeg->fsnav_dir_will), 0); //panxing for yuxing,2002-4-11
- CalcDirNow(&(pFsJpeg->fsnav_dir_will));
- FSShowDirIcon();
- DirList();
- #ifdef FS_BMP_GUI
- if (pFsJpeg->dir_current % PER_PAGE == 0)
- DIR_MoveScroll(pFsJpeg->dir_page_now);
- #endif
- //wanghaoying 2004-8-4 21:27, maybe this block not need for MP3_LARGE_GUI
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //when return to prev page,must show the current playing dir . zhaoyanhua 2004-6-30 10:14
- int dir_index = antiAnchorDir(pFsJpeg->fsnav_dir_will);
- if ( dir_index == ((pFsJpeg->dir_page_now) * PER_PAGE))//pFsJpeg->dir_page_now
- ShowCurrentDirPlaying();
- #endif// #if defined (NEW_MP3_GUI) || defined (FS_MP3_GUI)
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_DN;
- iRes = 0x20000|sys_cmd;
- sys_cmd = 0; // avoid receive another command,panxing,2002-4-13
- }
- }
- #ifdef FS_BMP_GUI //when control area is buttons, press down to move to files, add by feeling 2004-07-05
- else if (pFsJpeg->ControlArea > CNT_AREA_DIR)
- {
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)//zhaoyanhua 3-7-10 11:23
- {
- if (JPEG_Preview_drawed == JPEG_PREVIEW_IN_DIR_AREA)
- {
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA ;
- }
- // to solve when UP to preview JPEG,restart. 3-7-24 16:51
- pFsJpeg->gifsbPreview = 1;
- }
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_DN;
- iRes = 0x20000|sys_cmd;
- sys_cmd = 0; // avoid receive another command,panxing,2002-4-13
- }
- #endif
- else
- {
- iRes = 0;
- sys_cmd = 0;
- }
- #if (defined (NEW_MP3_GUI) || defined (FS_BMP_GUI))&& !(defined (MP3_JPEG_COWORK))
- //ycwen 2005/1/21 When MP3_JPEG_COWORK, ShowHL is needed when mp3/jpg long seek
- //#if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //avoid GUI blinking.zhaoyanhua 2004-2-2 16:25
- //reduce flash,when preview jpeg,suqiaoli add 2004-10-9
- if( (pFsJpeg->gifsFuncBtn != FS_FUNC_JPEG)||(pFsJpeg->ControlArea == CNT_AREA_DIR))
- ShowHL();
- #else
- SelectHL();
- #endif
- return iRes;
- }
- UINT32 FSGUI_CmdUp()
- {
- UINT32 iRes=0;
- #ifdef MP3_JPEG_COWORK
- old_time=get_stc_32_inline();//get the press time
- #endif
- if (pFsJpeg->gifsState == FS_STATE_JPEG)
- {//terry,2004/1/30 06:38PM
- #ifdef JPG_EFFECT
- sys_cmd = (CMD_SELECT | CMD_FUNC_GAME_UL);
- #else
- sys_cmd = iRes;
- #endif
- return sys_cmd;
- }
- if ((pFsJpeg->ControlArea == CNT_AREA_FILE)) {
- // Now in File area, panxing, 2002-1-29
- if (pFsJpeg->file_will > 0)
- {
- // needn't change file page, panxing, 2002-4-15
- (pFsJpeg->file_will)--;
- pFsJpeg->fsnav_trk_will = pFsJpeg->file_array[pFsJpeg->file_will] - pFsJpeg->first_mp3_entry;
- }
- else
- {
- // change file page now, panxing, 2002-4-15
- if (pFsJpeg->file_page_will)
- {
- pFsJpeg->file_page_will--;
- PrepareForChangeFilePage(pFsJpeg->file_page_will, 0, 1);
- ShowFileIcon();
- FileList();
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- ShowCurrentFilePlaying();//If refresh page,must redraw the current file playing.zhaoyanhua add 2004-2-3 9:09
- #ifdef FS_BMP_GUI
- MoveScroll(pFsJpeg->file_page_will);
- #endif
- #endif
- }
- #ifdef FS_BMP_GUI
- else//when control area is the first file in the file list, press up to move to the correspond button, add by feeling 2004-07-05
- {
- pFsJpeg->ControlArea = pFsJpeg->gifsFuncBtn +1;//CNT_AREA_MP3BUTTON;
- }
- #endif
- #ifdef FSGUI_NO_BLINK_SCROLL
- else
- {
- invalid_key();
- sys_cmd = iRes;
- return iRes;
- }
- #endif
- }
- #ifdef MP3_LARGE_GUI
- if ((pFsJpeg->gifsState == FS_STATE_LIST) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MP3))
- {
- Will2Playing();
- pFsJpeg->gifsbPreview = 1;
- }
- MoveScroll(pFsJpeg->file_page_will * PER_PAGE + pFsJpeg->file_will);
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_UL;
- #else
- FSGUI_FileAreaUpdownRefresh();
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_DN;
- #endif
- iRes = 0x20000|sys_cmd;
- sys_cmd = 0; //avoid to receive another sys_cmd when out mainloop,panxing,2002-4-13
- //Jeff 20020509
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- {
- //suqiaoli delete old part here,in order to show correctly Jpeg dir.
- _JPGBreak();
- #ifdef MP3_LARGE_GUI
- jpg_break_up_down = 0x10;
- #else
- jpg_break_up_down = 1; //Maoyong 2004.05.19
- #endif
- //Maoyong 2004.05.31,when IR up/down, should clear current preview picture
- #ifdef NEW_MP3_GUI
- FSGUI_FillFrameBuf(Rect[ PREVIEW_RECT].xStart, Rect[ PREVIEW_RECT].yStart,
- Rect[ PREVIEW_RECT].xSize, Rect[ PREVIEW_RECT].ySize,
- PREVIEW_BKGROUND_Y, PREVIEW_BKGROUND_CRCB);
- #elif !defined (FS_BMP_GUI)
- ClearArea(FS_AREA_PREVIEWJPG);
- #endif
- }//end if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- } //end if ((pFsJpeg->ControlArea == CNT_AREA_FILE))
- else if (pFsJpeg->ControlArea == CNT_AREA_DIR) {
- #ifdef FS_BMP_GUI //when control area is the first dir in the dir list, press up to move to the correspond button, add by feeling 2004-07-05
- if ( (pFsJpeg->dir_current == 0) && (pFsJpeg->dir_page_now == 0))
- {
- pFsJpeg->ControlArea = pFsJpeg->gifsFuncBtn +1;//CNT_AREA_MP3BUTTON;
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_UL;
- iRes = 0x20000 | sys_cmd;
- sys_cmd = 0;
- }
- else
- #endif
- // Now in dir area, panxing, 2002-1-22
- if (pFsJpeg->fsnav_dir_will)
- {
- pFsJpeg->fsnav_dir_will--;
- FSGUI_PreFindDir(&(pFsJpeg->fsnav_dir_will), 1); //panxing for yuxing,2002-4-11
- CalcDirNow(&(pFsJpeg->fsnav_dir_will));
- FSShowDirIcon();
- DirList();
- #ifdef FS_BMP_GUI
- if (pFsJpeg->dir_current % PER_PAGE == PER_PAGE - 1)
- DIR_MoveScroll(pFsJpeg->dir_page_now);
- #endif
- //wanghaoying 2004-8-4 21:27, maybe this block not need for MP3_LARGE_GUI
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //when return to prev page,must show the current playing dir . zhaoyanhua 2004-6-30 10:14
- int dir_index = antiAnchorDir(pFsJpeg->fsnav_dir_will);
- if ( dir_index == ((pFsJpeg->dir_page_now+1) * PER_PAGE - 1))//pFsJpeg->dir_page_now
- ShowCurrentDirPlaying();
- #endif// #if defined (NEW_MP3_GUI) || defined (FS_MP3_GUI)
- sys_cmd = CMD_SELECT|CMD_FUNC_GAME_UL;
- iRes = 0x20000|sys_cmd;
- sys_cmd = 0; //avoid to receive another commmand when timeout mainloop,panxing,2002-4-13
- }//end if (pFsJpeg->fsnav_dir_will)
- } //end if (pFsJpeg->ControlArea == CNT_AREA_DIR)
- #ifdef FS_BMP_GUI //when control area is button,when press up to reture invalid key, by feeling 2004-07-05
- else
- {
- invalid_key();
- sys_cmd = iRes;
- return iRes;
- }
- #else
- else
- {
- // Now in control button area, panxing, 2002-1-22
- pFsJpeg->ControlArea = CNT_AREA_FILE;
- iRes = 0x20000 | sys_cmd;
- sys_cmd = 0;
- #if defined (NEW_MP3_GUI) //|| defined (FS_BMP_GUI)
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)//zhaoyanhua 3-7-10 11:23
- {
- if (JPEG_Preview_drawed == JPEG_PREVIEW_IN_DIR_AREA)
- {
- JPEG_Preview_drawed = DIR_LIST_IN_DIR_AREA ;
- }
- // to solve when UP to preview JPEG,restart. 3-7-24 16:51
- pFsJpeg->gifsbPreview = 1;
- }
- #endif//end #if defined (NEW_MP3_GUI) //|| defined (FS_BMP_GUI)
- }
- #endif//end #ifdef FS_BMP_GUI
- #if (defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)) && !(defined (MP3_JPEG_COWORK)) //ycwen
- //ycwen : 2005/1/21 When MP3_JPEG_COWORK, ShowHL is needed when mp3/jpg long seek
- //#if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- //avoid GUI blinking.zhaoyanhua 2004-2-2 16:25
- //reduce flash,when preview jpeg,suqiaoli add 2004-10-9
- //if( (pFsJpeg->gifsFuncBtn != FS_FUNC_JPEG)||(pFsJpeg->ControlArea == CNT_AREA_DIR))
- if(!( (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)&&(pFsJpeg->ControlArea == CNT_AREA_FILE)))
- //replace by liudan,to avoid when up from first jpg dir to jpbbutton the key is invalid,2004-11-6 9:28
- ShowHL();
- #else
- SelectHL();
- #endif
- return iRes;
- }
- UINT32 FSGUI_CmdEnter()
- {
- UINT32 iRes=0;
- BYTE bSorb=1;
- #ifdef RECORD_PER_SECOND //avoid bug when playing mp3 gerry 2-12-3 19:46
- resumeMSF = 0;
- #endif
- #ifdef MP3_TXT_DISPLAY //zhaoyanhua add 2003-9-2 16:06
- if ((MP3_Lyrics_Drawed == MP3_LYRICS_IN_DIR_AREA) && (pFsJpeg->ControlArea != CNT_AREA_FILE))
- {
- MP3_Lyrics_Drawed = DIR_LIST_IN_DIR_AREA;
- DrawRectCorner(Rect[DIR_RECT], CORNER_RAD, 1, 40, DIR_AREA_BKGROUND_CRCB);
- }
- #endif
- #ifdef JPG_EFFECT
- jpeg_effect_init();
- #endif
- if (pFsJpeg->ControlArea == CNT_AREA_FILE)
- {
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- {
- #ifdef MENU_STOP_EXCHANGE
- pFsJpeg->g_nJpegMode=JPEG_THUMBNAIL_MODE; //xulf 2003-12-6
- #endif
- pFsJpeg->gifsState = FS_STATE_JPEG;
- #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
- osd_tog_region(1, OSD_OFF); //Maoyong 2004.03.11, When show "STOP", enter should make osd disappear
- #endif
- }
- else if (pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)
- {
- pFsJpeg->gifsState = FS_STATE_MP3;
- Will2Playing();
- }
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if (pFsJpeg->gifsFuncBtn == FS_FUNC_GAME)
- {
- pFsJpeg->gifsState = FS_STATE_GAME;
- }
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001 2004/01/07 yltseng
- else if (pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER)
- {
- pFsJpeg->gifsState = FS_STATE_OTHER;
- Will2Playing();
- }
- #endif
- #ifdef SUPPORT_MIDI
- else if (pFsJpeg->gifsFuncBtn == FS_FUNC_MIDI)
- {
- pFsJpeg->gifsState = FS_STATE_MIDI;
- Will2Playing();
- }
- #endif
- #if defined ( NEW_MP3_GUI) || defined ( FS_BMP_GUI)
- #ifdef NEW_MP3_GUI
- ClearRectArea(Rect[FILE_RECT], FILE_STEP, FILE_AREA_BKGROUND_CRCB,FS_AREA_FILEITEM, fsnav_file_HL);
- #else
- FSGUI_ClearArea(FS_AREA_FILEITEM, fsnav_file_HL);
- ShowFileIcon();//avoid disppearing file icon,suqiaoli add 2004-10-9
- #endif
- FSShowFileItem(fsnav_file_HL, iso9660_file[pFsJpeg->file_array[fsnav_file_HL]].name);//resume the last HL
- #endif
- sys_cmd = CMD_FUNC | CMD_FUNC_SELECT;
- iRes = sys_cmd;
- bSorb = 0;
- }
- else if (pFsJpeg->ControlArea == CNT_AREA_DIR)
- {
- pFsJpeg->fsnav_dir_now = pFsJpeg->fsnav_dir_will;
- FSGUI_PreChangeDir(&(pFsJpeg->fsnav_dir_now), 0);
- sys_cmd = CMD_FUNC | CMD_FUNC_SELECT;
- iRes = sys_cmd;
- bSorb = 0;
- #if !defined (FS_BMP_GUI)//zhaoyanhua add 2004-6-14 14:20
- refresh_dir_icon = 1;
- #endif//ifndef FS_BMP_GUI
- #if defined ( NEW_MP3_GUI ) || defined ( FS_BMP_GUI )
- if (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)//when change to DIR area, must refresh.zhaoyanhua note 3-7-10 11:12
- refresh_dir_page = 1;
- #ifdef NEW_MP3_GUI
- ClearRectArea(Rect[DIR_RECT], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, fsnav_dir_HL);
- #else
- FSGUI_ClearArea(FS_AREA_DIRITEM, fsnav_dir_HL);
- #endif
- //clear the last HL DirItem.
- #ifdef NEW_MP3_GUI
- ClearRectArea(Rect[DIR_RECT], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, fsnav_dir_HL);
- #endif
- ShowDirItem(fsnav_dir_HL, iso9660_dir[pFsJpeg->dir_array[fsnav_dir_HL]].name);//resume the last HL
- FSGUI_Refresh();
- #endif//#if defined ( NEW_MP3_GUI ) || defined ( FS_BMP_GUI )
- #ifdef HANYANG_LR_CHANGE_PAGE
- //When enter in DIR area, right to file area
- FSGUI_Dir2FileArea();
- #endif
- }
- else
- {
- // Now in button area, panxing, 2002-1-22
- int iChange = 0;
- #ifdef SETUP_PROGRAM_IN_PLACE_UNDER_16M
- // 2004/11/26 yltseng, When exit mp3 tab, pFsJpeg->gifsState will update to FS_STATE_LIST
- // only after leave MediaMainLoop; But during this little period of time, if we use this
- // variable to do something, we may get wrong data. So I update this variable here.
- pFsJpeg->gifsState = FS_STATE_LIST;
- #endif
- #ifdef FS_BMP_GUI
- //press enter to clear the down button
- //if hl is on the down button, the down button would not be changed,add by feeling 2004-07-05
- if (pFsJpeg->ControlArea != pFsJpeg->gifsFuncBtn +1)
- FSGUI_DrawOneButton(pFsJpeg->gifsFuncBtn,UP_STATE);
- #endif
- if ((pFsJpeg->ControlArea == CNT_AREA_MP3BUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MP3))
- {
- //Maoyong 2004.05.31 when preview JPEG, enter the MP3 , must redraw the background.
- if( (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG) && (pFsJpeg->gifsState == FS_STATE_LIST) )
- ClearJpegPreviewBg();
- #ifdef MP3_JPEG_COWORK
- back_sign=1;
- pFsJpeg->gifsFuncBtn=FS_FUNC_MP3;
- #else
- FSNav_MP3Init();
- #endif
- iChange = 1;
- }
- else if ((pFsJpeg->ControlArea == CNT_AREA_JPEGBUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_JPEG))
- {
- #ifdef IR_PROG_ON//nono 4-1-12 17:08
- if(prog_cnt)
- {
- prog_cnt = 0;
- PrintOsdMsg(STR_OS_PROG_CNL,REGION1,1,0);
- }
- #endif//#ifdef IR_PROG_ON
- #ifdef FSGUI_NO_BLINK_SCROLL
- up_down_done=0;
- #endif
- #if defined ( NEW_MP3_GUI) || defined ( FS_BMP_GUI)
- refresh_dir_page = 1; //Maoyong 2004.05.19
- #endif
- FSNav_JPEGInit();
- #ifdef JPG_EFFECT
- Jpg_Show_Usage_Page=0;
- Jpg_Show_Usage_Flag=0;
- #endif
- #if defined(IR_KODAK_EFFECT_KEY_USE_DISPLAY)//nono 20031122
- if (t_disp)
- {
- DispFadeOut();
- disp_mode=0;
- }
- #endif//defined(IR_KODAK_EFFECT_KEY_USE_DISPLAY)
- iChange = 1;
- }
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- else if ((pFsJpeg->ControlArea == CNT_AREA_GAMEBUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_GAME))
- {
- #ifdef IR_PROG_ON//nono 4-1-12 17:08
- if(prog_cnt)
- {
- prog_cnt = 0;
- PrintOsdMsg(STR_OS_PROG_CNL,REGION1,1,0);
- }
- #endif//#ifdef IR_PROG_ON
- /* nes driver is put into ROM, Robert 03/04/29
- if (pFsJpeg->gifsNESDrvSize > 0)
- */
- {
- AVD_SetMediaTimeout();
- iChange = 0;
- refresh_dir_page = 1;
- //Maoyong 2004.05.31 when preview JPEG, enter the MP3 , must redraw the background.
- if( (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG) && (pFsJpeg->gifsState == FS_STATE_LIST) )
- ClearJpegPreviewBg();
- #if defined(SUPPORT_NESGAME)||defined(SUPPORT_SPG_GAME)
- extern void FSNav_GameInit();
- FSNav_GameInit();
- #endif
- #ifdef FS_BMP_GUI
- FSGUI_ShowBtnTitle();//feeling 2004-07-29
- #endif
- sys_cmd = CMD_FUNC | CMD_FUNC_SELECT;
- iRes = 0x20000 | sys_cmd;
- return iRes;
- }
- }
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE // Robert 021001
- else if ((pFsJpeg->ControlArea == CNT_AREA_OTHERBUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_OTHER))
- {
- //wanghaoying changed, 2004-5-13 9:15
- #if defined(IR_PROG_ON)&&defined(NEW_MP3_GUI)//nono 4-1-12 17:08
- if(prog_cnt)
- {
- prog_cnt = 0;
- PrintOsdMsg(STR_OS_PROG_CNL,REGION1,1,0);
- }
- #endif//#ifdef IR_PROG_ON
- //Maoyong 2004.05.31 when preview JPEG, enter the MP3 , must redraw the background.
- if( (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG) && (pFsJpeg->gifsState == FS_STATE_LIST) )
- ClearJpegPreviewBg();
- //yanlb 2004.08.09 when support id3,preview MP3, enter the Other , must clear id3 region.
- #ifdef SUPPORT_OSDID3
- if(Is_MP3_STATE()){
- osd_tog_region(REGION3, OSD_OFF);
- }
- #endif
- #if defined(NEW_MP3_GUI) || defined (FS_BMP_GUI)//zhaoyanhua add 2004-6-15 13:57
- refresh_dir_page = 1;
- #endif
- FSNav_OtherInit();
- iChange = 1;
- }
- #endif
- #ifdef SUPPORT_MIDI
- else if ((pFsJpeg->ControlArea == CNT_AREA_MIDIBUTTON) && (pFsJpeg->gifsFuncBtn != FS_FUNC_MIDI))
- {
- MidiCreate();
- iChange = 1;
- }
- #endif
- if(iChange)
- {
- #if !(defined(NEW_MP3_GUI) || defined (FS_BMP_GUI))
- ClearArea(FS_AREA_PREVIEWJPG);
- #endif
- #ifdef DISPLAY_FBWARD_OSD //Maoyong added 2004-8-13 23:56
- if( (RegionOnOff[1][2]==STR_OS_FF)||(RegionOnOff[1][2]==STR_OS_FB) ) {
- timeout_osd[1]=1;//nono 2003-8-11 22:51
- adv_search_time = 0;
- }
- #endif//DISPLAY_FBWARD_OSD
- refresh_dir_page = 1;
- sys_cmd = CMD_FUNC | CMD_FUNC_SELECT;
- iRes = sys_cmd;
- bSorb = 0;
- }
- #ifdef HANYANG_LR_CHANGE_PAGE
- //after selecting button, change to dir area
- FSGUI_File2DirArea();
- #endif
- }
- if (bSorb == 1)
- {
- sys_cmd = 0;
- iRes=0;
- }
- #ifdef FS_BMP_GUI
- if (pFsJpeg->ControlArea >= CNT_AREA_MP3BUTTON)
- FSGUI_ShowBtnTitle();
- #endif
- return iRes;
- }
- #ifdef MP3_TXT_DISPLAY
- #define LYRECT_XSIZE 145
- #define LYRECT_XSTART 25
- void ClearLycArea(BTNAREA Rect, UINT16 RectColorStep,UINT16 RegionColor_C,int ItemStart, int ItemNumber)
- {
- int i =0;
- int x0=0,y0=0;
- UINT8 RegionColor_Y[60];
- int Region[60];
- UINT8 StepCount =0;
- int xAreaStart=0,yAreaStart = 0, xAreaSize=0,yAreaSize=0;
- // calulate the Y and Region width according to the given step.
- for ( i = 0; i < RectColorStep; i++ )
- {
- Region[i] = Rect.xStart + i*(Rect.xSize / RectColorStep);
- RegionColor_Y[i] = 0x36 + i*((0xc1 - 0x36)/RectColorStep);
- }
- xAreaStart = LYRECT_XSTART;
- yAreaStart = FS_DIRLIST_YSTART + ItemStart *FS_FILELIST_YSTEP;
- xAreaSize = LYRECT_XSIZE ;
- yAreaSize = ItemNumber*FS_FILELIST_YSTEP;
- StepCount = 0;
- //printf("Region[ 1 ] = %dn",Region[1]);
- while(xAreaStart >= Region[StepCount])
- {
- StepCount++;
- }
- StepCount = StepCount-1;
- //printf("xAreaStart=%d,Region[%d]=%dn",xAreaStart,StepCount,Region[StepCount]);
- for (x0 = xAreaStart; x0 < (xAreaStart+ xAreaSize); x0++)
- {
- if((StepCount +1) < RectColorStep)
- {
- if ((x0 >= Region[StepCount]) && (x0 < Region[StepCount + 1]))
- {
- StepCount++;
- }
- }
- else
- StepCount = RectColorStep -1;
- for (y0 = yAreaStart; y0 < (yAreaStart+yAreaSize); y0++)
- {
- *Y_XY((x0),(y0)) = RegionColor_Y[StepCount];
- *C_XY((x0),(y0)) = RegionColor_C;
- }
- }
- }
- #endif //#ifdef MP3_TXT_DISPLAY
- #if !defined(NEW_MP3_GUI)
- void ClearArea(UINT16 iIndex)
- {
- #ifdef AUDIO_SHOW_SAVER
- if (bDisableGUI) return;
- #endif
- if ((pFsJpeg->gifsState == FS_STATE_JPEG) && (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG))
- return;
- if ((iIndex == FS_AREA_FILEICON) && (refresh_file_page==0))
- {
- // need clear current file icon
- FSGUI_FillFrameBuf(fsArea[iIndex].xStart,
- fsArea[iIndex].yStart + pFsJpeg->file_current * FS_FILELIST_YSTEP,
- fsArea[iIndex].xSize, fsArea[iIndex].ySize,
- BK_GROUNDY, BK_GROUNDCRCB);
- }
- else if ((iIndex == FS_AREA_FILEICON) && (refresh_file_page == 1))
- {
- // clear all file icon
- FSGUI_FillFrameBuf(fsArea[iIndex].xStart, fsArea[iIndex].yStart,
- fsArea[iIndex].xSize, PER_PAGE * FS_FILELIST_YSTEP,
- BK_GROUNDY, BK_GROUNDCRCB);
- }
- else
- {
- // FSGUI_FillFrameBuf(fsArea[iIndex].xStart, fsArea[iIndex].yStart,
- FSGUI_FillFrameBuf(fsArea[iIndex].xStart - 2, fsArea[iIndex].yStart, // Robert 030506 for file area UI issue
- fsArea[iIndex].xSize, fsArea[iIndex].ySize,
- BK_GROUNDY, BK_GROUNDCRCB);
- }
- }
- #endif // if !defined(NEW_MP3_GUI)
- #ifdef NEW_MP3_GUI
- /*
- * FUNC : Clear the item in Rectangle with four corner.
- * NOTE: Rectangle dipslay with varient colors, so when clear the item
- * must use the same varient colors.
- * INPUT:
- * RgionIndex: FILE/DIR/PATH
- * RectColorStep: to calculate the same varient color as Rectangle.
- *
- * iIndex : Area index.
- * iItem : if iItem >=0, it means that only clear item (file,dir) not clear the whole Area.
- * Creator: zhaoyanhua
- * Date: 3-6-30 19:47
- */
- void ClearRectArea(BTNAREA Rect, UINT16 RectColorStep,UINT16 RegionColor_C,int iIndex,int iItem)
- {
- //int i =0;
- int x0=0,y0=0;
- //UINT8 RegionColor_Y[60];
- //int Region[60];
- UINT16 RegionStep = 0;
- UINT8 RegionColorStep_Y = 0;
- UINT8 StepCount =0;
- int xAreaStart=0,yAreaStart = 0, xAreaSize=0,yAreaSize=0;
- // calulate the Y and Region width according to the given step.
- #if 0
- for ( i = 0; i < RectColorStep; i++ )
- {
- Region[i] = Rect.xStart + i*(Rect.xSize / RectColorStep);
- RegionColor_Y[i] = 0x36 + i*((0xc1 - 0x36)/RectColorStep);
- //printf("Region[%d] = %d,REgionColor_Y[i] = %dn",i,Region[i],RegionColor_Y[i]);
- }
- #endif
- RegionStep = Rect.xSize / RectColorStep;
- RegionColorStep_Y = (0xc1-0x36) / RectColorStep;
- #ifdef MONO_FSGUI //mono FS GUI, axel 2003-12-29 23:26
- RectColorStep=1;
- RegionColorStep_Y=PREVIEW_BKGROUND_Y;
- #endif
- if ((iIndex == FS_AREA_FILEICON) && (refresh_file_page==0))
- {
- // need clear current file icon
- xAreaStart = fsArea[iIndex].xStart;
- yAreaStart = fsArea[iIndex].yStart + pFsJpeg->file_current * FS_FILELIST_YSTEP;
- xAreaSize = fsArea[iIndex].xSize;
- yAreaSize = fsArea[iIndex].ySize;
- }
- else if ((iIndex == FS_AREA_FILEICON) && (refresh_file_page == 1))
- {
- // clear all file icon
- xAreaStart = fsArea[iIndex].xStart;
- yAreaStart = fsArea[iIndex].yStart;
- xAreaSize = fsArea[iIndex].xSize;
- yAreaSize = PER_PAGE * FS_FILELIST_YSTEP;
- }
- else if (iItem >= 0) //for clear last FILE or DIR item when show Current playing.
- {
- xAreaStart = fsArea[iIndex].xStart - 2;
- yAreaStart = FS_DIRLIST_YSTART - DEMENSION_SIZE + iItem * FS_FILELIST_YSTEP;
- xAreaSize = ITEM_MAX_WIDTH;//clear width;
- yAreaSize = FS_FILELIST_YSTEP;
- }
- else
- {
- xAreaStart = fsArea[iIndex].xStart -2;
- yAreaStart = fsArea[iIndex].yStart;
- xAreaSize = fsArea[iIndex].xSize;
- yAreaSize = fsArea[iIndex].ySize;
- }
- StepCount = 0;
- while(xAreaStart >= (Rect.xStart + RegionStep * StepCount))
- {
- StepCount++;
- }
- StepCount = StepCount-1;
- for (x0 = xAreaStart; x0 < (xAreaStart+ xAreaSize); x0++)
- {
- if((StepCount +1) < RectColorStep)
- {
- if ((x0 >= (Rect.xStart + RegionStep * StepCount)) && (x0 < (Rect.xStart + RegionStep * (StepCount+1))))
- {
- StepCount++;
- }
- }
- else
- StepCount = RectColorStep -1;
- for (y0 = yAreaStart; y0 < (yAreaStart+yAreaSize); y0++)
- {
- *Y_XY((x0),(y0)) = 0x36+RegionColorStep_Y*StepCount;//RegionColor_Y[StepCount];
- *C_XY((x0),(y0)) = RegionColor_C;
- }
- }
- }
- /* Date : 3-6-30 17:10
- * FUNC: Draw a rectangle with 4 circle corner,
- * which is filled with varient colors.
- *
- * NOTE:
- * 1) if draw a rectangle neither UP nor DOWN, the function
- * will auto set the frame line color to be white .
- * 2) MAX_STEP is the max steps that the function can show.
- *
- * INPUT:
- * CornerRad: the corner radius
- * step: use to calculate a varient color.
- * if step = 0, only fill with default luminance value.
- * RegionColor_C : the base Chrominance of varient fill colors
- *
- * zhaoyanhua
- * Date:3-6-27 21:04
- */
- void DrawRectCorner( BTNAREA Rect, int CornerRad, BYTE updown, UINT8 step, UINT16 RegionColor_C)
- {
- int CornerType = 0;
- //Note :
- // "i" "j" to find the correct pixel value in the array Corner[i][j]
- // "x0" "y0" is the real position of one pixel in the framebuf.
- // To a array Corner[i][j], "i" adds in vertical while "j" add in horizonal.
- // In display, "y0" adds in vertical while "x0" adds in "horizonal".
- //
- //
- int i=0,j=0;
- int x0=0,y0=0;
- UINT8 RegionColor_Y[MAX_STEP];
- UINT16 Region[MAX_STEP];
- UINT8 StepCount =0;
- // to draw up or down.
- UINT16 LTColor_Y = 0,LTColor_CRCB = 0;//left ,top line use this color.
- UINT16 RBColor_Y = 0,RBColor_CRCB = 0;//right,bottom line use this color.
- int xStart=0,yStart=0,xLen =0,yLen=0;
- xStart = Rect.xStart;
- yStart = Rect.yStart;
- xLen = Rect.xSize;
- yLen = Rect.ySize;
- if (step)
- {
- // calulate the Y and Region width according to the given step.
- #ifdef MONO_FSGUI //mono FS GUI, axel 2003-12-29 23:26
- Region[0] = xLen;
- RegionColor_Y[0] = 0x36;//PREVIEW_BKGROUND_Y;
- #else
- for (i = 0; i < step; i++ )
- {
- Region[i] = i*(xLen / step);
- RegionColor_Y[i] = 0x36 + i*((0xc1 - 0x36)/step);
- }
- #endif
- }
- else //not draw step color. main for PREVIEW.
- {
- Region[0] = xLen;
- RegionColor_Y[0] = PREVIEW_BKGROUND_Y;
- }
- //calculate frame color according to the updown.
- if (updown == 1)//down
- {
- LTColor_Y = BLACK_Y;
- LTColor_CRCB = BLACK_CRCB;
- RBColor_Y = WHITE_Y;
- RBColor_CRCB= WHITE_CRCB;
- }
- else if(updown == 2)//up
- {
- LTColor_Y = WHITE_Y;
- LTColor_CRCB = WHITE_CRCB;
- RBColor_Y = BLACK_Y;
- RBColor_CRCB = BLACK_CRCB;
- }
- else//neither up nor down ,draw frame with the given paremeter"color_Y,color_CRCB"
- {
- LTColor_Y = WHITE_Y;
- LTColor_CRCB = WHITE_CRCB;
- RBColor_Y = WHITE_Y;
- RBColor_CRCB = WHITE_CRCB;
- }
- // draw x-majored
- for (x0 = 0; x0 < xLen; x0++)
- {
- // decide step-count
- if (step)
- {
- if((StepCount +1) < step)
- {
- if ((x0 >= Region[StepCount]) && (x0 < Region[StepCount + 1]))
- {
- StepCount++;
- }
- }
- else
- StepCount = step -1;
- }
- else
- StepCount = 0;
- for (y0 = 0; y0 < yLen; y0++)
- {
- #define DDD_TRANSPARENT 0
- #define DDD_REGION 1
- #define DDD_LT 2
- #define DDD_RB 3
- int ccc = DDD_TRANSPARENT;
- if ((y0 >= 0) && (y0 < CornerRad) //Left Top
- && (x0 >= 0) && (x0 < CornerRad))
- {
- CornerType = LT;
- i= y0;
- j= x0;
- if (CornerLT[i][j]==1) ccc=DDD_LT;
- else if (CornerLT[i][j]==2) ccc=DDD_REGION;
- }
- else if ((x0 >= ( xLen - CornerRad)) //Right_TOP
- && (x0 < xLen)
- && (y0 >= 0)
- && (y0 < CornerRad))
- {
- CornerType = RT;
- i = y0;
- j = x0 - (xLen - CornerRad);
- if (CornerRT[i][j]==1) ccc=DDD_RB;
- else if (CornerRT[i][j]==2) ccc=DDD_REGION;
- else if (CornerRT[i][j]==3) ccc=DDD_LT;
- }
- else if ((x0 >= 0) //Left_Bottom
- && (x0 < ( CornerRad))
- && (y0 >= ( yLen - CornerRad))
- && (y0 < ( yLen)))
- {
- CornerType = LB;
- j = x0;
- i = y0 - (yLen - CornerRad);
- if (CornerLB[i][j]==1) ccc=DDD_LT;
- else if (CornerLB[i][j]==2) ccc=DDD_REGION;
- }
- else if ((x0 >= ( xLen - CornerRad)) //Right_Bottom
- && (x0 < ( xLen))
- && (y0 >= ( yLen - CornerRad))
- && (y0 < ( yLen)))
- {
- CornerType = RB;
- j = x0 - (xLen - CornerRad);
- i = y0 - (yLen - CornerRad);
- if (CornerRB[i][j]==1) ccc=DDD_RB;
- else if (CornerRB[i][j]==2) ccc=DDD_REGION;
- }
- else
- ccc = DDD_REGION;
- if (ccc!=DDD_TRANSPARENT)
- {
- unsigned __y, __c;
- switch (ccc) {
- case DDD_LT: __y=LTColor_Y; __c=LTColor_CRCB; break;
- case DDD_RB: __y=RBColor_Y; __c=RBColor_CRCB; break;
- default: __y=RegionColor_Y[StepCount];
- __c=RegionColor_C;
- }
- FSGUI_DrawPixel(xStart+x0, yStart+y0, __y, __c);
- }
- } //end for y0
- }//end for x0
- //draw frame line
- FSGUI_FillFrameBuf(xStart+CornerRad, yStart, (xLen - 2*CornerRad), DEMENSION_SIZE, LTColor_Y, LTColor_CRCB); //the top line
- FSGUI_FillFrameBuf((xStart+xLen-DEMENSION_SIZE), (yStart + CornerRad), DEMENSION_SIZE, (yLen - 2*CornerRad), RBColor_Y, RBColor_CRCB);//the right line
- FSGUI_FillFrameBuf((xStart + CornerRad ), (yStart + yLen),(xLen - 2*CornerRad), DEMENSION_SIZE, RBColor_Y, RBColor_CRCB);//the bottom line
- FSGUI_FillFrameBuf(xStart, (yStart + CornerRad), DEMENSION_SIZE, (yLen - 2*CornerRad), LTColor_Y, LTColor_CRCB);//the left line
- }
- //
- // ARROW
- //
- // FUNCTION
- // DrawArrow(x, y, updown)
- //
- // updown=1 --> UP
- // updown=x --> DOWN
- //
- #include "fsgui_icon_arrowx.inc"
- void DrawArrow(int xStart, int yStart, BYTE updown)
- {
- FSGUI_DrawIcon(xStart, yStart, ICON_ArrowX, cluty_fsgui, clutc_fsgui, ((updown!=1) ? 0 : FSGUI_ICON_YFLIP));
- FSGUI_FillFrameBuf(xStart, yStart, ARROW_SIZE, DEMENSION_SIZE, WHITE_Y,WHITE_CRCB); //top line
- FSGUI_FillFrameBuf(xStart, yStart, DEMENSION_SIZE, ARROW_SIZE, WHITE_Y,WHITE_CRCB); //left line
- FSGUI_FillFrameBuf(xStart+ARROW_SIZE-DEMENSION_SIZE, yStart, DEMENSION_SIZE, ARROW_SIZE, BLACK_Y,BLACK_CRCB); //Right line
- FSGUI_FillFrameBuf(xStart, yStart+ARROW_SIZE, ARROW_SIZE, DEMENSION_SIZE, BLACK_Y,BLACK_CRCB);//bottom line
- }
- /*
- * FUNC: to show current dir which is playing.
- *
- * Creator: zhaoyanhua
- * date: 3-7-2 12:56
- */
- void ShowCurrentDirPlaying()
- {
- UINT16 dir_now = 0,dir_will = 0;
- if (pFsJpeg->ControlArea == CNT_AREA_DIR)
- {
- #if 0//zhoayanhua mask 2004-2-2 17:16
- if (HL_show == fsnav_dir_HL)
- return;
- #endif
- }
- //clear the last HL DirItem.
- ClearRectArea(Rect[DIR_RECT], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, fsnav_dir_HL);
- ShowDirItem(fsnav_dir_HL, iso9660_dir[pFsJpeg->dir_array[fsnav_dir_HL]].name);//resume the last HL
- #ifdef NEW_MP3_GUI_DEBUG
- printf("In ShowCurrentDir fsnav_dir_will= %d,fsnav_dir_now = %dn",pFsJpeg->fsnav_dir_will,pFsJpeg->fsnav_dir_now);
- #endif
- //locate the positon of fsnav_dir_will and fsnav_dir_now in the current type(MP3/JPEG/GAME).
- dir_will = antiAnchorDir(pFsJpeg->fsnav_dir_will);
- dir_now = antiAnchorDir(pFsJpeg->fsnav_dir_now);
- //In the same page ,show the HL.
- if ((dir_will / PER_PAGE) == (dir_now / PER_PAGE) )
- {
- fsnav_dir_HL = dir_now % PER_PAGE;
- ShowPlayFrame(fsArea[FS_AREA_DIRITEM].xStart - 2, FS_DIRLIST_YSTART - DEMENSION_SIZE + fsnav_dir_HL * FS_FILELIST_YSTEP,HL_Width, HL_Heighth+2);//draw the current HL
- }
- }
- /*
- * FUNC: to show current file which is playing
- *
- * Creator: zhaoyanhua
- * Date: 3-7-2 12:56
- */
- void ShowCurrentFilePlaying()
- {
- //avoid when HL and the current page in the same item,not show HL. zhaoyanhua 3-7-15 21:12
- if (pFsJpeg->ControlArea == CNT_AREA_FILE)
- {
- #if 0
- if (HL_show == fsnav_file_HL)
- return;
- #endif
- }
- ClearRectArea(Rect[FILE_RECT], FILE_STEP, FILE_AREA_BKGROUND_CRCB,FS_AREA_FILEITEM, fsnav_file_HL);
- FSShowFileItem(fsnav_file_HL, iso9660_file[pFsJpeg->file_array[fsnav_file_HL]].name);//resume the last HL
- #ifdef NEW_MP3_GUI_DEBUG
- printf("***ShowCurrentFile ,file_page_now = %d,file_page_will = %d,file_current =%dn",pFsJpeg->file_page_now,pFsJpeg->file_page_will,pFsJpeg-> file_current);
- #endif
- //In the same page ,show the HL.
- if ((pFsJpeg->file_page_will) == (pFsJpeg->file_page_now) )
- {
- fsnav_file_HL = (pFsJpeg->file_current);
- ShowPlayFrame(fsArea[FS_AREA_FILEITEM].xStart - 2, FS_DIRLIST_YSTART - DEMENSION_SIZE + fsnav_file_HL * FS_FILELIST_YSTEP,HL_Width, HL_Heighth+2);//draw the current HL
- }
- }
- /*
- * FUNC : draw the frame line to show the current playing file or dir.
- *
- * zhaoyanhua 3-7-1 19:21
- */
- void ShowPlayFrame(int x, int y,int len,int high)
- {
- if((len!=0)&&(high!=0)) {
- FSGUI_FillFrameBuf(x,y,len,DEMENSION_SIZE,BLACK_Y,BLACK_CRCB);
- FSGUI_FillFrameBuf(x,y,DEMENSION_SIZE, high,BLACK_Y,BLACK_CRCB);
- }
- //draw light line
- if((len!=0)&&(high!=0)) {
- FSGUI_FillFrameBuf(x+DEMENSION_SIZE, y+high-DEMENSION_SIZE,len-DEMENSION_SIZE,DEMENSION_SIZE,WHITE_Y,WHITE_CRCB);
- FSGUI_FillFrameBuf(x+len-DEMENSION_SIZE, y+DEMENSION_SIZE, DEMENSION_SIZE, high-DEMENSION_SIZE,WHITE_Y,WHITE_CRCB);
- }
- }
- #endif //#ifdef NEW_MP3_GUI
- //-------------------------------------------------------------------
- // Refresh():
- // Refresh the GUI to display the real-time copying file process
- // liweihua 2004-12-9 14:00
- //-------------------------------------------------------------------
- #ifdef FAT_FILE_MODE//lijd 2005-1-5 19:15
- void Refresh(BYTE copy_process)
- {
- if(copy_process<=100)
- {
- psprintf(linebuf, "COPYING FILE[%d%s]", copy_process,"%");
- ShowWarning(linebuf);
- }
- if(copy_process >= 100)
- {
- psprintf(linebuf, "COPYING FILE[100%s]", "%");
- ShowWarning(linebuf);
- }
- }
- #elif defined(SUPPORT_MULTI_PARTITION)
- void Refresh(BYTE copy_process)
- {
- if(copy_process<=100)
- {
- psprintf(linebuf, "COPYING FILE[%d%s]", copy_process,"%");
- FSGUI_UpdateInfoArea(linebuf);
- FSGUI_FillFrameBuf(49,237+1,(49+copy_process*2),4,HL_Y,HL_CRCB);
- }
- if(copy_process >= 100)
- {
- psprintf(linebuf, "COPYING FILE[100%s]", "%");
- FSGUI_UpdateInfoArea(linebuf);
- FSGUI_FillFrameBuf(46,237,255,6,BK_GROUNDY,BK_CRCB);
- }
- }
- //#else
- //void Refresh(BYTE copy_process)
- //{}
- #endif