[vlc-commits] ncurses: fix display glitch in stats/info/meta boxes

Rafaël Carré git at videolan.org
Sat May 7 00:30:13 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Thu May  5 23:04:52 2011 -0400| [375a8961a8e3dbdbdbb826f6e733e134d8b64e60] | committer: Rafaël Carré

ncurses: fix display glitch in stats/info/meta boxes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=375a8961a8e3dbdbdbb826f6e733e134d8b64e60
---

 modules/gui/ncurses.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index b920f5b..172a68d 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -778,8 +778,7 @@ static int DrawMeta(intf_thread_t *p_intf)
             continue;
 
         if (p_sys->b_color) color_set(C_CATEGORY, NULL);
-        MainBoxWrite(p_sys, l++, "  [%s]",
-                     vlc_meta_TypeToLocalizedString(i));
+        MainBoxWrite(p_sys, l++, "  [%s]", vlc_meta_TypeToLocalizedString(i));
         if (p_sys->b_color) color_set(C_DEFAULT, NULL);
         MainBoxWrite(p_sys, l++, "      %s", psz_meta);
     }
@@ -1221,7 +1220,9 @@ static void Redraw(intf_thread_t *p_intf)
     {
         FillBox(p_intf);
 
-        if (p_sys->i_box_start > p_sys->i_box_lines_total - 1)
+        if (p_sys->i_box_lines_total == 0)
+            p_sys->i_box_start = 0;
+        else if (p_sys->i_box_start > p_sys->i_box_lines_total - 1)
             p_sys->i_box_start = p_sys->i_box_lines_total - 1;
         y += __MIN(p_sys->i_box_lines_total - p_sys->i_box_start,
                    p_sys->i_box_height);



More information about the vlc-commits mailing list