summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/text_viewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/text_viewer.c')
-rw-r--r--apps/plugins/text_viewer/text_viewer.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c
index fae2f071aa..4817710cb3 100644
--- a/apps/plugins/text_viewer/text_viewer.c
+++ b/apps/plugins/text_viewer/text_viewer.c
@@ -35,7 +35,6 @@ enum plugin_status plugin_start(const void* file)
35 long old_tick; 35 long old_tick;
36 bool done = false; 36 bool done = false;
37 bool display_update = true; 37 bool display_update = true;
38 const struct tv_preferences *prefs = tv_get_preferences();
39 38
40 old_tick = *rb->current_tick; 39 old_tick = *rb->current_tick;
41 40
@@ -66,7 +65,7 @@ enum plugin_status plugin_start(const void* file)
66 case TV_MENU2: 65 case TV_MENU2:
67#endif 66#endif
68 { 67 {
69 enum tv_menu_result res = tv_menu(); 68 unsigned res = tv_menu();
70 69
71 if (res != TV_MENU_RESULT_EXIT_MENU) 70 if (res != TV_MENU_RESULT_EXIT_MENU)
72 { 71 {
@@ -108,13 +107,13 @@ enum plugin_status plugin_start(const void* file)
108 107
109 case TV_SCREEN_LEFT: 108 case TV_SCREEN_LEFT:
110 case TV_SCREEN_LEFT | BUTTON_REPEAT: 109 case TV_SCREEN_LEFT | BUTTON_REPEAT:
111 if (prefs->windows > 1) 110 if (preferences->windows > 1)
112 { 111 {
113 /* Screen left */ 112 /* Screen left */
114 tv_scroll_left(TV_HORIZONTAL_SCROLL_PREFS); 113 tv_scroll_left(TV_HORIZONTAL_SCROLL_PREFS);
115 } 114 }
116 else { /* prefs->windows == 1 */ 115 else { /* prefs->windows == 1 */
117 if (prefs->narrow_mode == NM_PAGE) 116 if (preferences->narrow_mode == NM_PAGE)
118 { 117 {
119 /* scroll to previous page */ 118 /* scroll to previous page */
120 tv_scroll_up(TV_VERTICAL_SCROLL_PAGE); 119 tv_scroll_up(TV_VERTICAL_SCROLL_PAGE);
@@ -129,13 +128,13 @@ enum plugin_status plugin_start(const void* file)
129 128
130 case TV_SCREEN_RIGHT: 129 case TV_SCREEN_RIGHT:
131 case TV_SCREEN_RIGHT | BUTTON_REPEAT: 130 case TV_SCREEN_RIGHT | BUTTON_REPEAT:
132 if (prefs->windows > 1) 131 if (preferences->windows > 1)
133 { 132 {
134 /* Screen right */ 133 /* Screen right */
135 tv_scroll_right(TV_HORIZONTAL_SCROLL_PREFS); 134 tv_scroll_right(TV_HORIZONTAL_SCROLL_PREFS);
136 } 135 }
137 else { /* prefs->windows == 1 */ 136 else { /* prefs->windows == 1 */
138 if (prefs->narrow_mode == NM_PAGE) 137 if (preferences->narrow_mode == NM_PAGE)
139 { 138 {
140 /* scroll to next page */ 139 /* scroll to next page */
141 tv_scroll_down(TV_VERTICAL_SCROLL_PAGE); 140 tv_scroll_down(TV_VERTICAL_SCROLL_PAGE);
@@ -206,7 +205,7 @@ enum plugin_status plugin_start(const void* file)
206 } 205 }
207 if (autoscroll) 206 if (autoscroll)
208 { 207 {
209 if(old_tick <= *rb->current_tick - (110 - prefs->autoscroll_speed * 10)) 208 if(old_tick <= *rb->current_tick - (110 - preferences->autoscroll_speed * 10))
210 { 209 {
211 tv_scroll_down(TV_VERTICAL_SCROLL_PREFS); 210 tv_scroll_down(TV_VERTICAL_SCROLL_PREFS);
212 old_tick = *rb->current_tick; 211 old_tick = *rb->current_tick;