summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-06-04 08:43:32 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-06-04 08:43:32 +0000
commitbc26fe7a96d6f5e443003cb871dcb4bfba525352 (patch)
treefa05f187ca308af7bbddbc74a0270cd46cb48b72 /apps/plugins/mpegplayer
parente174a8ad8dc531ff093894b7f930f0b9750c74eb (diff)
downloadrockbox-bc26fe7a96d6f5e443003cb871dcb4bfba525352.tar.gz
rockbox-bc26fe7a96d6f5e443003cb871dcb4bfba525352.zip
Add a wrapper header, mylcd.h, in the lib subdirectory, which lets plugins' code automatically call the proper functions depending if compilation is for greylib or color display, also forms proper call to grey_ and xlcd_. mylcd_ub_ call greylib unbuffered routines, regular lcd routines otherwise. Form is mylcd_<fnname>, <fnname> is the symbol name stripped of prefixes lcd_, grey_, or xlcd_. Convert a couple plugins I know well (easy job).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26542 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c68
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c92
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h18
-rw-r--r--apps/plugins/mpegplayer/video_out_rockbox.c10
-rw-r--r--apps/plugins/mpegplayer/video_thread.c4
5 files changed, 91 insertions, 101 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 1ac2476b25..1f321c1285 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -540,11 +540,11 @@ static void grey_splash(int ticks, const unsigned char *fmt, ...)
540 540
541static void show_loading(struct vo_rect *rc) 541static void show_loading(struct vo_rect *rc)
542{ 542{
543 int oldmode = lcd_(get_drawmode)(); 543 int oldmode = mylcd_get_drawmode();
544 lcd_(set_drawmode)(DRMODE_SOLID | DRMODE_INVERSEVID); 544 mylcd_set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID);
545 lcd_(fillrect)(rc->l-1, rc->t-1, rc->r - rc->l + 2, rc->b - rc->t + 2); 545 mylcd_fillrect(rc->l-1, rc->t-1, rc->r - rc->l + 2, rc->b - rc->t + 2);
546 lcd_(set_drawmode)(oldmode); 546 mylcd_set_drawmode(oldmode);
547 lcd_(splash)(0, "Loading..."); 547 mylcd_splash(0, "Loading...");
548} 548}
549 549
550static void draw_slider(uint32_t range, uint32_t pos, struct vo_rect *rc) 550static void draw_slider(uint32_t range, uint32_t pos, struct vo_rect *rc)
@@ -567,36 +567,36 @@ static void draw_slider(uint32_t range, uint32_t pos, struct vo_rect *rc)
567 /* Put positition on left */ 567 /* Put positition on left */
568 ts_to_hms(pos, &hms); 568 ts_to_hms(pos, &hms);
569 hms_format(str, sizeof(str), &hms); 569 hms_format(str, sizeof(str), &hms);
570 lcd_(getstringsize)(str, NULL, &text_h); 570 mylcd_getstringsize(str, NULL, &text_h);
571 text_y = SLIDER_Y - SLIDER_TEXTMARGIN - text_h; 571 text_y = SLIDER_Y - SLIDER_TEXTMARGIN - text_h;
572 572
573 if (rc == NULL) 573 if (rc == NULL)
574 { 574 {
575 int oldmode = lcd_(get_drawmode)(); 575 int oldmode = mylcd_get_drawmode();
576 lcd_(set_drawmode)(DRMODE_BG | DRMODE_INVERSEVID); 576 mylcd_set_drawmode(DRMODE_BG | DRMODE_INVERSEVID);
577 lcd_(fillrect)(SLIDER_X, text_y, SLIDER_WIDTH, 577 mylcd_fillrect(SLIDER_X, text_y, SLIDER_WIDTH,
578 LCD_HEIGHT - SLIDER_BMARGIN - text_y 578 LCD_HEIGHT - SLIDER_BMARGIN - text_y
579 - SLIDER_TMARGIN); 579 - SLIDER_TMARGIN);
580 lcd_(set_drawmode)(oldmode); 580 mylcd_set_drawmode(oldmode);
581 581
582 lcd_(putsxy)(SLIDER_X, text_y, str); 582 mylcd_putsxy(SLIDER_X, text_y, str);
583 583
584 /* Put duration on right */ 584 /* Put duration on right */
585 ts_to_hms(range, &hms); 585 ts_to_hms(range, &hms);
586 hms_format(str, sizeof(str), &hms); 586 hms_format(str, sizeof(str), &hms);
587 lcd_(getstringsize)(str, &text_w, NULL); 587 mylcd_getstringsize(str, &text_w, NULL);
588 588
589 lcd_(putsxy)(SLIDER_X + SLIDER_WIDTH - text_w, text_y, str); 589 mylcd_putsxy(SLIDER_X + SLIDER_WIDTH - text_w, text_y, str);
590 590
591 /* Draw slider */ 591 /* Draw slider */
592 lcd_(drawrect)(SLIDER_X, SLIDER_Y, SLIDER_WIDTH, SLIDER_HEIGHT); 592 mylcd_drawrect(SLIDER_X, SLIDER_Y, SLIDER_WIDTH, SLIDER_HEIGHT);
593 lcd_(fillrect)(SLIDER_X, SLIDER_Y, 593 mylcd_fillrect(SLIDER_X, SLIDER_Y,
594 muldiv_uint32(pos, SLIDER_WIDTH, range), 594 muldiv_uint32(pos, SLIDER_WIDTH, range),
595 SLIDER_HEIGHT); 595 SLIDER_HEIGHT);
596 596
597 /* Update screen */ 597 /* Update screen */
598 lcd_(update_rect)(SLIDER_X, text_y - SLIDER_TMARGIN, SLIDER_WIDTH, 598 mylcd_update_rect(SLIDER_X, text_y - SLIDER_TMARGIN, SLIDER_WIDTH,
599 LCD_HEIGHT - SLIDER_BMARGIN - text_y + SLIDER_TEXTMARGIN); 599 LCD_HEIGHT - SLIDER_BMARGIN - text_y + SLIDER_TEXTMARGIN);
600 } 600 }
601 else 601 else
602 { 602 {
@@ -612,28 +612,28 @@ static bool display_thumb_image(const struct vo_rect *rc)
612{ 612{
613 if (!stream_display_thumb(rc)) 613 if (!stream_display_thumb(rc))
614 { 614 {
615 lcd_(splash)(0, "Frame not available"); 615 mylcd_splash(0, "Frame not available");
616 return false; 616 return false;
617 } 617 }
618 618
619 /* Draw a raised border around the frame */ 619 /* Draw a raised border around the frame */
620 int oldcolor = lcd_(get_foreground)(); 620 int oldcolor = mylcd_get_foreground();
621 lcd_(set_foreground)(DRAW_LIGHTGRAY); 621 mylcd_set_foreground(MYLCD_LIGHTGRAY);
622 622
623 lcd_(hline)(rc->l-1, rc->r-1, rc->t-1); 623 mylcd_hline(rc->l-1, rc->r-1, rc->t-1);
624 lcd_(vline)(rc->l-1, rc->t, rc->b-1); 624 mylcd_vline(rc->l-1, rc->t, rc->b-1);
625 625
626 lcd_(set_foreground)(DRAW_DARKGRAY); 626 mylcd_set_foreground(MYLCD_DARKGRAY);
627 627
628 lcd_(hline)(rc->l-1, rc->r, rc->b); 628 mylcd_hline(rc->l-1, rc->r, rc->b);
629 lcd_(vline)(rc->r, rc->t-1, rc->b); 629 mylcd_vline(rc->r, rc->t-1, rc->b);
630 630
631 lcd_(set_foreground)(oldcolor); 631 mylcd_set_foreground(oldcolor);
632 632
633 lcd_(update_rect)(rc->l-1, rc->t-1, rc->r - rc->l + 2, 1); 633 mylcd_update_rect(rc->l-1, rc->t-1, rc->r - rc->l + 2, 1);
634 lcd_(update_rect)(rc->l-1, rc->t, 1, rc->b - rc->t); 634 mylcd_update_rect(rc->l-1, rc->t, 1, rc->b - rc->t);
635 lcd_(update_rect)(rc->l-1, rc->b, rc->r - rc->l + 2, 1); 635 mylcd_update_rect(rc->l-1, rc->b, rc->r - rc->l + 2, 1);
636 lcd_(update_rect)(rc->r, rc->t, 1, rc->b - rc->t); 636 mylcd_update_rect(rc->r, rc->t, 1, rc->b - rc->t);
637 637
638 return true; 638 return true;
639} 639}
@@ -679,8 +679,8 @@ static int get_start_time(uint32_t duration)
679 679
680 enum state_enum slider_state = STATE0; 680 enum state_enum slider_state = STATE0;
681 681
682 lcd_(clear_display)(); 682 mylcd_clear_display();
683 lcd_(update)(); 683 mylcd_update();
684 684
685#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 685#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
686 rb->add_event(LCD_EVENT_ACTIVATION, false, get_start_time_lcd_enable_hook); 686 rb->add_event(LCD_EVENT_ACTIVATION, false, get_start_time_lcd_enable_hook);
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index ee38484b19..961214f407 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -473,7 +473,7 @@ static unsigned draw_blendcolor(unsigned c1, unsigned c2, unsigned char amount)
473 * The origin is the upper-left corner of the OSD area */ 473 * The origin is the upper-left corner of the OSD area */
474static void draw_update_rect(int x, int y, int width, int height) 474static void draw_update_rect(int x, int y, int width, int height)
475{ 475{
476 lcd_(update_rect)(_X, _Y, _W, _H); 476 mylcd_update_rect(_X, _Y, _W, _H);
477} 477}
478 478
479static void draw_clear_area(int x, int y, int width, int height) 479static void draw_clear_area(int x, int y, int width, int height)
@@ -495,34 +495,34 @@ static void draw_clear_area_rect(const struct vo_rect *rc)
495 495
496static void draw_fillrect(int x, int y, int width, int height) 496static void draw_fillrect(int x, int y, int width, int height)
497{ 497{
498 lcd_(fillrect)(_X, _Y, _W, _H); 498 mylcd_fillrect(_X, _Y, _W, _H);
499} 499}
500 500
501static void draw_hline(int x1, int x2, int y) 501static void draw_hline(int x1, int x2, int y)
502{ 502{
503#ifdef LCD_LANDSCAPE 503#ifdef LCD_LANDSCAPE
504 lcd_(hline)(x1 + osd.x, x2 + osd.x, y + osd.y); 504 mylcd_hline(x1 + osd.x, x2 + osd.x, y + osd.y);
505#else 505#else
506 y = LCD_WIDTH - (y + osd.y) - 1; 506 y = LCD_WIDTH - (y + osd.y) - 1;
507 lcd_(vline)(y, x1 + osd.x, x2 + osd.x); 507 mylcd_vline(y, x1 + osd.x, x2 + osd.x);
508#endif 508#endif
509} 509}
510 510
511static void draw_vline(int x, int y1, int y2) 511static void draw_vline(int x, int y1, int y2)
512{ 512{
513#ifdef LCD_LANDSCAPE 513#ifdef LCD_LANDSCAPE
514 lcd_(vline)(x + osd.x, y1 + osd.y, y2 + osd.y); 514 mylcd_vline(x + osd.x, y1 + osd.y, y2 + osd.y);
515#else 515#else
516 y1 = LCD_WIDTH - (y1 + osd.y) - 1; 516 y1 = LCD_WIDTH - (y1 + osd.y) - 1;
517 y2 = LCD_WIDTH - (y2 + osd.y) - 1; 517 y2 = LCD_WIDTH - (y2 + osd.y) - 1;
518 lcd_(hline)(y1, y2, x + osd.x); 518 mylcd_hline(y1, y2, x + osd.x);
519#endif 519#endif
520} 520}
521 521
522static void draw_scrollbar_draw(int x, int y, int width, int height, 522static void draw_scrollbar_draw(int x, int y, int width, int height,
523 uint32_t min, uint32_t max, uint32_t val) 523 uint32_t min, uint32_t max, uint32_t val)
524{ 524{
525 unsigned oldfg = lcd_(get_foreground)(); 525 unsigned oldfg = mylcd_get_foreground();
526 526
527 draw_hline(x + 1, x + width - 2, y); 527 draw_hline(x + 1, x + width - 2, y);
528 draw_hline(x + 1, x + width - 2, y + height - 1); 528 draw_hline(x + 1, x + width - 2, y + height - 1);
@@ -534,11 +534,11 @@ static void draw_scrollbar_draw(int x, int y, int width, int height,
534 534
535 draw_fillrect(x + 1, y + 1, val, height - 2); 535 draw_fillrect(x + 1, y + 1, val, height - 2);
536 536
537 lcd_(set_foreground)(osd.prog_fillcolor); 537 mylcd_set_foreground(osd.prog_fillcolor);
538 538
539 draw_fillrect(x + 1 + val, y + 1, width - 2 - val, height - 2); 539 draw_fillrect(x + 1 + val, y + 1, width - 2 - val, height - 2);
540 540
541 lcd_(set_foreground)(oldfg); 541 mylcd_set_foreground(oldfg);
542} 542}
543 543
544static void draw_scrollbar_draw_rect(const struct vo_rect *rc, int min, 544static void draw_scrollbar_draw_rect(const struct vo_rect *rc, int min,
@@ -656,18 +656,18 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
656 int stride, int x, int y, 656 int stride, int x, int y,
657 int width, int height) 657 int width, int height)
658{ 658{
659 int mode = lcd_(get_drawmode)(); 659 int mode = mylcd_get_drawmode();
660 lcd_(set_drawmode)(DRMODE_FG); 660 mylcd_set_drawmode(DRMODE_FG);
661 lcd_(mono_bitmap_part)(src, src_x, src_y, stride, x, y, width, height); 661 mylcd_mono_bitmap_part(src, src_x, src_y, stride, x, y, width, height);
662 lcd_(set_drawmode)(mode); 662 mylcd_set_drawmode(mode);
663} 663}
664 664
665static void draw_putsxy_oriented(int x, int y, const char *str) 665static void draw_putsxy_oriented(int x, int y, const char *str)
666{ 666{
667 int mode = lcd_(get_drawmode)(); 667 int mode = mylcd_get_drawmode();
668 lcd_(set_drawmode)(DRMODE_FG); 668 mylcd_set_drawmode(DRMODE_FG);
669 lcd_(putsxy)(x + osd.x, y + osd.y, str); 669 mylcd_putsxy(x + osd.x, y + osd.y, str);
670 lcd_(set_drawmode)(mode); 670 mylcd_set_drawmode(mode);
671} 671}
672#endif /* LCD_PORTRAIT */ 672#endif /* LCD_PORTRAIT */
673 673
@@ -718,7 +718,7 @@ static void osd_text_init(void)
718 int phys; 718 int phys;
719 int spc_width; 719 int spc_width;
720 720
721 lcd_(setfont)(FONT_UI); 721 mylcd_setfont(FONT_UI);
722 722
723 osd.x = 0; 723 osd.x = 0;
724 osd.width = SCREEN_WIDTH; 724 osd.width = SCREEN_WIDTH;
@@ -730,7 +730,7 @@ static void osd_text_init(void)
730 730
731 ts_to_hms(stream_get_duration(), &hms); 731 ts_to_hms(stream_get_duration(), &hms);
732 hms_format(buf, sizeof (buf), &hms); 732 hms_format(buf, sizeof (buf), &hms);
733 lcd_(getstringsize)(buf, &osd.time_rect.r, &osd.time_rect.b); 733 mylcd_getstringsize(buf, &osd.time_rect.r, &osd.time_rect.b);
734 734
735 /* Choose well-sized bitmap images relative to font height */ 735 /* Choose well-sized bitmap images relative to font height */
736 if (osd.time_rect.b < 12) { 736 if (osd.time_rect.b < 12) {
@@ -760,8 +760,8 @@ static void osd_text_init(void)
760 rb->snprintf(buf, sizeof(buf), "%d%s", phys, 760 rb->snprintf(buf, sizeof(buf), "%d%s", phys,
761 rb->sound_unit(SOUND_VOLUME)); 761 rb->sound_unit(SOUND_VOLUME));
762 762
763 lcd_(getstringsize)(" ", &spc_width, NULL); 763 mylcd_getstringsize(" ", &spc_width, NULL);
764 lcd_(getstringsize)(buf, &osd.vol_rect.r, &osd.vol_rect.b); 764 mylcd_getstringsize(buf, &osd.vol_rect.r, &osd.vol_rect.b);
765 765
766 osd.prog_rect.r = SCREEN_WIDTH - OSD_BDR_L - spc_width - 766 osd.prog_rect.r = SCREEN_WIDTH - OSD_BDR_L - spc_width -
767 osd.vol_rect.r - OSD_BDR_R; 767 osd.vol_rect.r - OSD_BDR_R;
@@ -787,7 +787,7 @@ static void osd_text_init(void)
787#endif 787#endif
788 osd.y = SCREEN_HEIGHT - osd.height; 788 osd.y = SCREEN_HEIGHT - osd.height;
789 789
790 lcd_(setfont)(FONT_SYSFIXED); 790 mylcd_setfont(FONT_SYSFIXED);
791} 791}
792 792
793static void osd_init(void) 793static void osd_init(void)
@@ -836,39 +836,39 @@ static void osd_refresh_background(void)
836 char buf[32]; 836 char buf[32];
837 struct hms hms; 837 struct hms hms;
838 838
839 unsigned bg = lcd_(get_background)(); 839 unsigned bg = mylcd_get_background();
840 lcd_(set_drawmode)(DRMODE_SOLID | DRMODE_INVERSEVID); 840 mylcd_set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID);
841 841
842#ifdef HAVE_LCD_COLOR 842#ifdef HAVE_LCD_COLOR
843 /* Draw a "raised" area for our graphics */ 843 /* Draw a "raised" area for our graphics */
844 lcd_(set_background)(draw_blendcolor(bg, DRAW_WHITE, 192)); 844 mylcd_set_background(draw_blendcolor(bg, MYLCD_WHITE, 192));
845 draw_hline(0, osd.width, 0); 845 draw_hline(0, osd.width, 0);
846 846
847 lcd_(set_background)(draw_blendcolor(bg, DRAW_WHITE, 80)); 847 mylcd_set_background(draw_blendcolor(bg, MYLCD_WHITE, 80));
848 draw_hline(0, osd.width, 1); 848 draw_hline(0, osd.width, 1);
849 849
850 lcd_(set_background)(draw_blendcolor(bg, DRAW_BLACK, 48)); 850 mylcd_set_background(draw_blendcolor(bg, MYLCD_BLACK, 48));
851 draw_hline(0, osd.width, osd.height-2); 851 draw_hline(0, osd.width, osd.height-2);
852 852
853 lcd_(set_background)(draw_blendcolor(bg, DRAW_BLACK, 128)); 853 mylcd_set_background(draw_blendcolor(bg, MYLCD_BLACK, 128));
854 draw_hline(0, osd.width, osd.height-1); 854 draw_hline(0, osd.width, osd.height-1);
855 855
856 lcd_(set_background)(bg); 856 mylcd_set_background(bg);
857 draw_clear_area(0, 2, osd.width, osd.height - 4); 857 draw_clear_area(0, 2, osd.width, osd.height - 4);
858#else 858#else
859 /* Give contrast with the main background */ 859 /* Give contrast with the main background */
860 lcd_(set_background)(GREY_WHITE); 860 mylcd_set_background(MYLCD_WHITE);
861 draw_hline(0, osd.width, 0); 861 draw_hline(0, osd.width, 0);
862 862
863 lcd_(set_background)(GREY_DARKGRAY); 863 mylcd_set_background(MYLCD_DARKGRAY);
864 draw_hline(0, osd.width, osd.height-1); 864 draw_hline(0, osd.width, osd.height-1);
865 865
866 lcd_(set_background)(bg); 866 mylcd_set_background(bg);
867 draw_clear_area(0, 1, osd.width, osd.height - 2); 867 draw_clear_area(0, 1, osd.width, osd.height - 2);
868#endif 868#endif
869 869
870 vo_rect_set_ext(&osd.update_rect, 0, 0, osd.width, osd.height); 870 vo_rect_set_ext(&osd.update_rect, 0, 0, osd.width, osd.height);
871 lcd_(set_drawmode)(DRMODE_SOLID); 871 mylcd_set_drawmode(DRMODE_SOLID);
872 872
873 if (stream_get_duration() != INVALID_TIMESTAMP) { 873 if (stream_get_duration() != INVALID_TIMESTAMP) {
874 /* Draw the movie duration */ 874 /* Draw the movie duration */
@@ -912,7 +912,7 @@ static void osd_refresh_volume(void)
912 rb->snprintf(buf, sizeof (buf), "%d%s", 912 rb->snprintf(buf, sizeof (buf), "%d%s",
913 rb->sound_val2phys(SOUND_VOLUME, volume), 913 rb->sound_val2phys(SOUND_VOLUME, volume),
914 rb->sound_unit(SOUND_VOLUME)); 914 rb->sound_unit(SOUND_VOLUME));
915 lcd_(getstringsize)(buf, &width, NULL); 915 mylcd_getstringsize(buf, &width, NULL);
916 916
917 /* Right-justified */ 917 /* Right-justified */
918 draw_clear_area_rect(&osd.vol_rect); 918 draw_clear_area_rect(&osd.vol_rect);
@@ -930,11 +930,11 @@ static void osd_refresh_status(void)
930 930
931#ifdef HAVE_LCD_COLOR 931#ifdef HAVE_LCD_COLOR
932 /* Draw status icon with a drop shadow */ 932 /* Draw status icon with a drop shadow */
933 unsigned oldfg = lcd_(get_foreground)(); 933 unsigned oldfg = mylcd_get_foreground();
934 int i = 1; 934 int i = 1;
935 935
936 lcd_(set_foreground)(draw_blendcolor(lcd_(get_background)(), 936 mylcd_set_foreground(draw_blendcolor(mylcd_get_background(),
937 DRAW_BLACK, 96)); 937 MYLCD_BLACK, 96));
938 938
939 while (1) 939 while (1)
940 { 940 {
@@ -949,7 +949,7 @@ static void osd_refresh_status(void)
949 if (--i < 0) 949 if (--i < 0)
950 break; 950 break;
951 951
952 lcd_(set_foreground)(oldfg); 952 mylcd_set_foreground(oldfg);
953 } 953 }
954 954
955 vo_rect_union(&osd.update_rect, &osd.update_rect, &osd.stat_rect); 955 vo_rect_union(&osd.update_rect, &osd.update_rect, &osd.stat_rect);
@@ -1076,12 +1076,12 @@ static void osd_refresh(int hint)
1076 1076
1077 /* Set basic drawing params that are used. Elements that perform variations 1077 /* Set basic drawing params that are used. Elements that perform variations
1078 * will restore them. */ 1078 * will restore them. */
1079 oldfg = lcd_(get_foreground)(); 1079 oldfg = mylcd_get_foreground();
1080 oldbg = lcd_(get_background)(); 1080 oldbg = mylcd_get_background();
1081 1081
1082 lcd_(setfont)(FONT_UI); 1082 mylcd_setfont(FONT_UI);
1083 lcd_(set_foreground)(osd.fgcolor); 1083 mylcd_set_foreground(osd.fgcolor);
1084 lcd_(set_background)(osd.bgcolor); 1084 mylcd_set_background(osd.bgcolor);
1085 1085
1086 vo_rect_clear(&osd.update_rect); 1086 vo_rect_clear(&osd.update_rect);
1087 1087
@@ -1103,9 +1103,9 @@ static void osd_refresh(int hint)
1103 } 1103 }
1104 1104
1105 /* Go back to defaults */ 1105 /* Go back to defaults */
1106 lcd_(setfont)(FONT_SYSFIXED); 1106 mylcd_setfont(FONT_SYSFIXED);
1107 lcd_(set_foreground)(oldfg); 1107 mylcd_set_foreground(oldfg);
1108 lcd_(set_background)(oldbg); 1108 mylcd_set_background(oldbg);
1109 1109
1110 /* Update the dirty rectangle */ 1110 /* Update the dirty rectangle */
1111 vo_lock(); 1111 vo_lock();
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index f6617cedff..79c25f6109 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -67,24 +67,14 @@
67#define DISK_GUARDBUF_SIZE ALIGN_UP(65535+6, 4) 67#define DISK_GUARDBUF_SIZE ALIGN_UP(65535+6, 4)
68 68
69#ifdef HAVE_LCD_COLOR 69#ifdef HAVE_LCD_COLOR
70#define DRAW_BLACK LCD_BLACK 70#define mylcd_splash rb->splash
71#define DRAW_DARKGRAY LCD_DARKGRAY
72#define DRAW_LIGHTGRAY LCD_LIGHTGRAY
73#define DRAW_WHITE LCD_WHITE
74#define lcd_(fn) rb->lcd_##fn
75#define lcd_splash splash
76
77#else 71#else
78
79#include "lib/grey.h" 72#include "lib/grey.h"
80#define DRAW_BLACK GREY_BLACK 73#define mylcd_splash grey_splash
81#define DRAW_DARKGRAY GREY_DARKGRAY
82#define DRAW_LIGHTGRAY GREY_LIGHTGRAY
83#define DRAW_WHITE GREY_WHITE
84#define lcd_(fn) grey_##fn
85
86#endif 74#endif
87 75
76#include "lib/mylcd.h"
77
88#include "mpeg2.h" 78#include "mpeg2.h"
89#include "video_out.h" 79#include "video_out.h"
90#include "mpeg_stream.h" 80#include "mpeg_stream.h"
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c
index ee0efb8824..cf47982ab7 100644
--- a/apps/plugins/mpegplayer/video_out_rockbox.c
+++ b/apps/plugins/mpegplayer/video_out_rockbox.c
@@ -86,16 +86,16 @@ static void vo_draw_black(void)
86 86
87 video_lock(); 87 video_lock();
88 88
89 foreground = lcd_(get_foreground)(); 89 foreground = mylcd_get_foreground();
90 90
91 lcd_(set_foreground)(DRAW_BLACK); 91 mylcd_set_foreground(MYLCD_BLACK);
92 92
93 lcd_(fillrect)(vo.output_x, vo.output_y, vo.output_width, 93 mylcd_fillrect(vo.output_x, vo.output_y, vo.output_width,
94 vo.output_height); 94 vo.output_height);
95 lcd_(update_rect)(vo.output_x, vo.output_y, vo.output_width, 95 mylcd_update_rect(vo.output_x, vo.output_y, vo.output_width,
96 vo.output_height); 96 vo.output_height);
97 97
98 lcd_(set_foreground)(foreground); 98 mylcd_set_foreground(foreground);
99 99
100 video_unlock(); 100 video_unlock();
101} 101}
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c
index 6d60e64131..8feacbdef2 100644
--- a/apps/plugins/mpegplayer/video_thread.c
+++ b/apps/plugins/mpegplayer/video_thread.c
@@ -80,10 +80,10 @@ static void draw_fps(struct video_thread_data *td)
80 td->info->display_picture->temporal_reference, 80 td->info->display_picture->temporal_reference,
81 /* Audio information */ 81 /* Audio information */
82 buf_pct, pcm_underruns, pcm_skipped); 82 buf_pct, pcm_underruns, pcm_skipped);
83 lcd_(putsxy)(0, 0, str); 83 mylcd_putsxy(0, 0, str);
84 84
85 vo_lock(); 85 vo_lock();
86 lcd_(update_rect)(0, 0, LCD_WIDTH, 8); 86 mylcd_update_rect(0, 0, LCD_WIDTH, 8);
87 vo_unlock(); 87 vo_unlock();
88 88
89 td->last_showfps = *rb->current_tick; 89 td->last_showfps = *rb->current_tick;