summaryrefslogtreecommitdiff
path: root/apps/gui/scrollbar.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-04-11 22:22:44 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-04-11 22:22:44 +0000
commit76328bbfda561dabe30312ed9d510cc7ed2ef063 (patch)
treec4b38938db24e4952c23a6bfb265cc5e94991bf3 /apps/gui/scrollbar.c
parentac0722da742426f36fda973a477e50ebb493ea21 (diff)
downloadrockbox-76328bbfda561dabe30312ed9d510cc7ed2ef063.tar.gz
rockbox-76328bbfda561dabe30312ed9d510cc7ed2ef063.zip
Fix the scrollbar boundary checking to prevent the player from freezing on screens that are too small to show the list with the font selected. Correct the M:Robe remote screen height.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20690 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/scrollbar.c')
-rw-r--r--apps/gui/scrollbar.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index 0cb3602d11..8a0b885c4b 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -92,6 +92,14 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y,
92 inner_y = y + 1; 92 inner_y = y + 1;
93 inner_wd = width - 2; 93 inner_wd = width - 2;
94 inner_ht = height - 2; 94 inner_ht = height - 2;
95
96 /* Boundary check to make sure that height is reasonable, otherwise nothing
97 * to do
98 */
99 if(height<2 || width<2)
100 {
101 return;
102 }
95 103
96 if (flags & HORIZONTAL) 104 if (flags & HORIZONTAL)
97 inner_len = inner_wd; 105 inner_len = inner_wd;