summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAvi Eisenberg <613ike@gmail.com>2014-02-16 15:54:54 -0500
committerMichael Giacomelli <giac2000@hotmail.com>2014-04-01 02:37:32 +0200
commitb4a09868e126b7ff243a27abd729144cef44c9bf (patch)
tree58eda42c67aad3c058ff5df6c537b8d6893389cd /apps
parent0eae33c60a6fb8bea24ec7bb867da8aba33ea04b (diff)
downloadrockbox-b4a09868e126b7ff243a27abd729144cef44c9bf.tar.gz
rockbox-b4a09868e126b7ff243a27abd729144cef44c9bf.zip
Boost CPU before loading operations in textviewer
Change-Id: I88c813227c1c4c79fbf9cc2e0288d576a981c995 Reviewed-on: http://gerrit.rockbox.org/758 Reviewed-by: Avi Eisenberg <613ike@gmail.com> Tested: Avi Eisenberg <613ike@gmail.com> Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/text_viewer/tv_action.c16
-rw-r--r--apps/plugins/text_viewer/tv_bookmark.c16
2 files changed, 32 insertions, 0 deletions
diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c
index 3a0d895331..798871c430 100644
--- a/apps/plugins/text_viewer/tv_action.c
+++ b/apps/plugins/text_viewer/tv_action.c
@@ -172,9 +172,17 @@ void tv_top(void)
172 172
173void tv_bottom(void) 173void tv_bottom(void)
174{ 174{
175#ifdef HAVE_ADJUSTABLE_CPU_FREQ
176 rb->cpu_boost(true);
177#endif
178
175 tv_move_screen(0, 0, SEEK_END); 179 tv_move_screen(0, 0, SEEK_END);
176 if (preferences->vertical_scroll_mode == VS_PAGE) 180 if (preferences->vertical_scroll_mode == VS_PAGE)
177 tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR); 181 tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR);
182
183#ifdef HAVE_ADJUSTABLE_CPU_FREQ
184 rb->cpu_boost(false);
185#endif
178} 186}
179 187
180unsigned tv_menu(void) 188unsigned tv_menu(void)
@@ -187,9 +195,17 @@ unsigned tv_menu(void)
187 195
188 if (res == TV_MENU_RESULT_EXIT_MENU) 196 if (res == TV_MENU_RESULT_EXIT_MENU)
189 { 197 {
198#ifdef HAVE_ADJUSTABLE_CPU_FREQ
199 rb->cpu_boost(true);
200#endif
201
190 tv_convert_fpos(cur_file_pos, &cur_pos); 202 tv_convert_fpos(cur_file_pos, &cur_pos);
191 203
192 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET); 204 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);
205
206#ifdef HAVE_ADJUSTABLE_CPU_FREQ
207 rb->cpu_boost(false);
208#endif
193 } 209 }
194 else if (res == TV_MENU_RESULT_MOVE_PAGE) 210 else if (res == TV_MENU_RESULT_MOVE_PAGE)
195 res = TV_MENU_RESULT_EXIT_MENU; 211 res = TV_MENU_RESULT_EXIT_MENU;
diff --git a/apps/plugins/text_viewer/tv_bookmark.c b/apps/plugins/text_viewer/tv_bookmark.c
index 807c3e9a3b..0f5d58b24e 100644
--- a/apps/plugins/text_viewer/tv_bookmark.c
+++ b/apps/plugins/text_viewer/tv_bookmark.c
@@ -103,8 +103,16 @@ static int tv_change_preferences(const struct tv_preferences *oldp)
103 103
104 if (oldp) 104 if (oldp)
105 { 105 {
106#ifdef HAVE_ADJUSTABLE_CPU_FREQ
107 rb->cpu_boost(true);
108#endif
109
106 for (i = 0; i < bookmark_count; i++) 110 for (i = 0; i < bookmark_count; i++)
107 tv_convert_fpos(bookmarks[i].pos.file_pos, &bookmarks[i].pos); 111 tv_convert_fpos(bookmarks[i].pos.file_pos, &bookmarks[i].pos);
112
113#ifdef HAVE_ADJUSTABLE_CPU_FREQ
114 rb->cpu_boost(false);
115#endif
108 } 116 }
109 return TV_CALLBACK_OK; 117 return TV_CALLBACK_OK;
110} 118}
@@ -249,7 +257,15 @@ void tv_select_bookmark(void)
249 if (preferences->vertical_scroll_mode == VS_PAGE) 257 if (preferences->vertical_scroll_mode == VS_PAGE)
250 select_pos.line = 0; 258 select_pos.line = 0;
251 259
260#ifdef HAVE_ADJUSTABLE_CPU_FREQ
261 rb->cpu_boost(true);
262#endif
263
252 tv_move_screen(select_pos.page, select_pos.line, SEEK_SET); 264 tv_move_screen(select_pos.page, select_pos.line, SEEK_SET);
265
266#ifdef HAVE_ADJUSTABLE_CPU_FREQ
267 rb->cpu_boost(false);
268#endif
253} 269}
254 270
255/* serialize or deserialize of the bookmark array */ 271/* serialize or deserialize of the bookmark array */