From 9bf6351195580a917a8beaea8ae09b475733305b Mon Sep 17 00:00:00 2001 From: sleske Date: Sat, 13 Jul 2013 20:37:21 +0000 Subject: Fix:core:Integrate transform_setup into transform_new. Avoids two-step initialization and access to undefined variables in struct transform.|Part of fix for #1145. git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5544 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/osd/core/osd_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'navit/osd/core') diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c index fe0b1907f..cf9dcda7a 100644 --- a/navit/osd/core/osd_core.c +++ b/navit/osd/core/osd_core.c @@ -3555,6 +3555,7 @@ osd_auxmap_init(struct osd_priv_common *opc, struct navit *nav) struct graphics *gra; struct attr attr; struct map_selection sel; + struct pcoord center={ projection_mg, 0, 0}; struct color red={0xffff,0x0,0x0,0xffff}; this->nav=nav; @@ -3576,10 +3577,10 @@ osd_auxmap_init(struct osd_priv_common *opc, struct navit *nav) this->red=graphics_gc_new(gra); graphics_gc_set_foreground(this->red,&red); graphics_gc_set_linewidth(this->red,3); - this->trans=transform_new(); memset(&sel, 0, sizeof(sel)); sel.u.p_rect.rl.x=opc->osd_item.w; sel.u.p_rect.rl.y=opc->osd_item.h; + this->trans=transform_new(¢er, 16, 0); transform_set_screen_selection(this->trans, &sel); graphics_set_rect(opc->osd_item.gr, &sel.u.p_rect); #if 0 -- cgit v1.2.1