forked from len0rd/rockbox
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
|
|
@ -277,17 +277,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
|
||||||
(bar->time->tm_min != bar->last_tm_min) ||
|
(bar->time->tm_min != bar->last_tm_min) ||
|
||||||
#endif
|
#endif
|
||||||
memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info)))
|
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->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||||
display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT);
|
display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT);
|
||||||
display->set_drawmode(DRMODE_SOLID);
|
display->set_drawmode(DRMODE_SOLID);
|
||||||
|
|
@ -829,8 +820,10 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
|
||||||
return;
|
return;
|
||||||
#endif /* HAVE_LCD_BITMAP */
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
int i;
|
int i;
|
||||||
|
struct viewport viewport;
|
||||||
FOR_NB_SCREENS(i) {
|
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…
Add table
Add a link
Reference in a new issue