From 32340186c7ceee00e2a9da644fdf7f5d1fc002bf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 7 Sep 2009 21:52:12 +0000 Subject: 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 --- apps/gui/viewport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3