summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-12-31 05:59:26 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-12-31 05:59:26 +0000
commite385ee18ce501e26189d5a2a68d092104720df30 (patch)
tree5219051887835d9750d80f71d9849ceb3aa65d82 /apps/gui/gwps-common.c
parent54919ae9176bd9cbffc8412f0c831f471b8ac4d5 (diff)
downloadrockbox-e385ee18ce501e26189d5a2a68d092104720df30.tar.gz
rockbox-e385ee18ce501e26189d5a2a68d092104720df30.zip
Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.
viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.) All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false). This commit also includes some menu/list viewport cleanups from kugel in FS#9603 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 46453dc4c9..5e134b5fa3 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -61,6 +61,7 @@
61#include "playback.h" 61#include "playback.h"
62#endif 62#endif
63#include "backdrop.h" 63#include "backdrop.h"
64#include "viewport.h"
64 65
65#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ 66#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */
66 /* 3% of 30min file == 54s step size */ 67 /* 3% of 30min file == 54s step size */
@@ -78,17 +79,17 @@
78#ifdef HAVE_LCD_BITMAP 79#ifdef HAVE_LCD_BITMAP
79static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force) 80static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force)
80{ 81{
82 (void)force;
81 bool draw = global_settings.statusbar; 83 bool draw = global_settings.statusbar;
82 84
83 if (wps->data->wps_sb_tag) 85 if (wps->data->wps_sb_tag)
84 draw = wps->data->show_sb_on_wps; 86 draw = wps->data->show_sb_on_wps;
85 87
86 if (draw) 88 if (!draw)
87 gui_statusbar_draw(wps->statusbar, force); 89 viewportmanager_set_statusbar(false);
88} 90}
89#else 91#else
90#define gui_wps_statusbar_draw(wps, force) \ 92#define gui_wps_statusbar_draw(wps, force)
91 gui_statusbar_draw((wps)->statusbar, (force))
92#endif 93#endif
93#include "pcmbuf.h" 94#include "pcmbuf.h"
94 95
@@ -335,9 +336,6 @@ bool gui_wps_display(void)
335 if (!wps_state.id3 && !(audio_status() & AUDIO_STATUS_PLAY)) 336 if (!wps_state.id3 && !(audio_status() & AUDIO_STATUS_PLAY))
336 { 337 {
337 global_status.resume_index = -1; 338 global_status.resume_index = -1;
338#ifdef HAVE_LCD_BITMAP
339 gui_syncstatusbar_draw(&statusbars, true);
340#endif
341 splash(HZ, ID2P(LANG_END_PLAYLIST)); 339 splash(HZ, ID2P(LANG_END_PLAYLIST));
342 return true; 340 return true;
343 } 341 }