Ticket #1262: trac1262.patch

File trac1262.patch, 1.2 KB (added by mvglasow (2), 7 years ago)

Patch to fix relative-size auxmap, should be applied after #1260 patch

  • navit/navit/osd/core/osd_core.c

    From 766d87e15d5f87919ec0c6f394af618184588e74 Mon Sep 17 00:00:00 2001
    From: mvglasow <michael -at- vonglasow.com>
    Date: Sat, 11 Oct 2014 22:56:11 +0200
    Subject: [PATCH] Draw auxmap OSD correctly for relative sizes, fixes #1262
    
    Signed-off-by: mvglasow <michael -at- vonglasow.com>
    ---
     navit/navit/osd/core/osd_core.c |   11 +++++++++++
     1 file changed, 11 insertions(+)
    
    diff --git a/navit/navit/osd/core/osd_core.c b/navit/navit/osd/core/osd_core.c
    index 25fb0c0..09c89c1 100644
    a b osd_auxmap_draw(struct osd_priv_common *opc) 
    35463546                return;
    35473547        p.x=opc->osd_item.w/2;
    35483548        p.y=opc->osd_item.h/2;
     3549
     3550        if (opc->osd_item.rel_h || opc->osd_item.rel_w) {
     3551                struct map_selection sel;
     3552                memset(&sel, 0, sizeof(sel));
     3553                sel.u.p_rect.rl.x=opc->osd_item.w;
     3554                sel.u.p_rect.rl.y=opc->osd_item.h;
     3555                printf("osd_auxmap_draw: sel.u.p_rect.rl=(%d, %d)\n", opc->osd_item.w, opc->osd_item.h);
     3556                transform_set_screen_selection(this->trans, &sel);
     3557                graphics_set_rect(opc->osd_item.gr, &sel.u.p_rect);
     3558        }
     3559
    35493560        transform_set_center(this->trans, transform_get_center(this->ntrans));
    35503561        transform_set_scale(this->trans, 64);
    35513562        transform_set_yaw(this->trans, transform_get_yaw(this->ntrans));