forked from len0rd/rockbox
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>
This commit is contained in:
parent
0eae33c60a
commit
b4a09868e1
2 changed files with 32 additions and 0 deletions
|
|
@ -172,9 +172,17 @@ void tv_top(void)
|
|||
|
||||
void tv_bottom(void)
|
||||
{
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
#endif
|
||||
|
||||
tv_move_screen(0, 0, SEEK_END);
|
||||
if (preferences->vertical_scroll_mode == VS_PAGE)
|
||||
tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned tv_menu(void)
|
||||
|
|
@ -187,9 +195,17 @@ unsigned tv_menu(void)
|
|||
|
||||
if (res == TV_MENU_RESULT_EXIT_MENU)
|
||||
{
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
#endif
|
||||
|
||||
tv_convert_fpos(cur_file_pos, &cur_pos);
|
||||
|
||||
tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(false);
|
||||
#endif
|
||||
}
|
||||
else if (res == TV_MENU_RESULT_MOVE_PAGE)
|
||||
res = TV_MENU_RESULT_EXIT_MENU;
|
||||
|
|
|
|||
|
|
@ -103,8 +103,16 @@ static int tv_change_preferences(const struct tv_preferences *oldp)
|
|||
|
||||
if (oldp)
|
||||
{
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < bookmark_count; i++)
|
||||
tv_convert_fpos(bookmarks[i].pos.file_pos, &bookmarks[i].pos);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(false);
|
||||
#endif
|
||||
}
|
||||
return TV_CALLBACK_OK;
|
||||
}
|
||||
|
|
@ -249,7 +257,15 @@ void tv_select_bookmark(void)
|
|||
if (preferences->vertical_scroll_mode == VS_PAGE)
|
||||
select_pos.line = 0;
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
#endif
|
||||
|
||||
tv_move_screen(select_pos.page, select_pos.line, SEEK_SET);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* serialize or deserialize of the bookmark array */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue