summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg White <gwhite@rockbox.org>2007-01-14 03:30:11 +0000
committerGreg White <gwhite@rockbox.org>2007-01-14 03:30:11 +0000
commit382b7a4f8642abb2ef4848e08d211009cf7750d5 (patch)
treefea1133b38ee22560526625c74a07c402256e27a
parent0262cba304a47d9dc689bfbd3538b4b41c5b21c5 (diff)
downloadrockbox-382b7a4f8642abb2ef4848e08d211009cf7750d5.tar.gz
rockbox-382b7a4f8642abb2ef4848e08d211009cf7750d5.zip
Skip scroll check when LCD is disabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12004 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/lcd-16bit.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index 024386e4e5..b8075b216b 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -81,10 +81,10 @@ static const char scroll_tick_table[16] = {
81/* LCD init */ 81/* LCD init */
82void lcd_init(void) 82void lcd_init(void)
83{ 83{
84 lcd_clear_display(); 84 lcd_clear_display();
85 85
86 /* Call device specific init */ 86 /* Call device specific init */
87 lcd_init_device(); 87 lcd_init_device();
88 88
89 89
90 create_thread(scroll_thread, scroll_stack, 90 create_thread(scroll_thread, scroll_stack,
@@ -220,7 +220,7 @@ void lcd_set_backdrop(fb_data* backdrop)
220 lcd_backdrop_offset = 0; 220 lcd_backdrop_offset = 0;
221 lcd_fastpixelfuncs = lcd_fastpixelfuncs_bgcolor; 221 lcd_fastpixelfuncs = lcd_fastpixelfuncs_bgcolor;
222 } 222 }
223 lcd_device_prepare_backdrop(backdrop); 223 lcd_device_prepare_backdrop(backdrop);
224} 224}
225 225
226fb_data* lcd_get_backdrop(void) 226fb_data* lcd_get_backdrop(void)
@@ -938,6 +938,10 @@ static void scroll_thread(void)
938 scrolling_lines = 0; 938 scrolling_lines = 0;
939 939
940 while ( 1 ) { 940 while ( 1 ) {
941 if(!lcd_enabled()) {
942 sleep(scroll_ticks);
943 continue;
944 }
941 for ( index = 0; index < SCROLLABLE_LINES; index++ ) { 945 for ( index = 0; index < SCROLLABLE_LINES; index++ ) {
942 /* really scroll? */ 946 /* really scroll? */
943 if ( !(scrolling_lines&(1<<index)) ) 947 if ( !(scrolling_lines&(1<<index)) )