fiddle with the code a bit so gcc doesnt optimise out a struct viewport causeing crashes in text_viewer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27045 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5a44e43870
commit
7de980cd7a
1 changed files with 4 additions and 11 deletions
|
@ -278,16 +278,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
|
|||
#endif
|
||||
memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info)))
|
||||
{
|
||||
if (vp == NULL)
|
||||
{
|
||||
struct viewport viewport;
|
||||
GET_RECT(viewport,statusbar_position(display->screen_type),display);
|
||||
display->set_viewport(&viewport);
|
||||
}
|
||||
else
|
||||
{
|
||||
display->set_viewport(vp);
|
||||
}
|
||||
display->set_viewport(vp);
|
||||
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT);
|
||||
display->set_drawmode(DRMODE_SOLID);
|
||||
|
@ -829,8 +820,10 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
|
|||
return;
|
||||
#endif /* HAVE_LCD_BITMAP */
|
||||
int i;
|
||||
struct viewport viewport;
|
||||
FOR_NB_SCREENS(i) {
|
||||
gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, NULL );
|
||||
GET_RECT(viewport,statusbar_position(i),&screens[i]);
|
||||
gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue