summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-07 21:52:12 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-07 21:52:12 +0000
commit32340186c7ceee00e2a9da644fdf7f5d1fc002bf (patch)
tree4796f8753587c5541b05369175350019713ce4d1 /apps
parent8ad60026fefdf1c4c4704b05b384abc1e881b535 (diff)
Fix viewport_set_defaults giving the wrong dimensions if the ui vp is overridden (as done in plugins atm), and notify other code if the ui vp was overridden.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22657 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/viewport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 281c04b2c5..06caa2379d 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -140,7 +140,7 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen)
{
#ifdef HAVE_LCD_BITMAP
if (ui_vp_info.active[screen])
- *vp = custom_vp[screen];
+ *vp = ui_vp_info.vp[screen];
else
#endif
viewport_set_fullscreen(vp, screen);
@@ -280,6 +280,9 @@ void viewport_set_current_vp(struct viewport* vp)
ui_vp_info.vp = vp;
else
ui_vp_info.vp = custom_vp;
+
+ /* must be done after the assignment above or event handler get old vps */
+ send_event(GUI_EVENT_THEME_CHANGED, NULL);
}
struct viewport* viewport_get_current_vp(void)