diff options
author | Johan FitiƩ <jfitie@gmail.com> | 2017-08-01 18:57:00 +0200 |
---|---|---|
committer | Johan FitiƩ <jfitie@gmail.com> | 2017-08-01 18:57:00 +0200 |
commit | 3088c955a77263f2dc41955e560f83e132f284ea (patch) | |
tree | b79b4f64ff026357f3d2f91a26428b4d91e2e23f | |
parent | 2f35911cda4a35356b5d6e29abfe516a99525c9a (diff) | |
download | navit-autozoomosd.tar.gz |
Apply pitch correction in reverse when reading attributeautozoomosd
-rw-r--r-- | navit/navit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/navit/navit.c b/navit/navit.c index 120b96049..fa2db9926 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -2596,7 +2596,7 @@ navit_set_attr_do(struct navit *this_, struct attr *attr, int init) case attr_pitch: attr_updated=(this_->pitch != attr->u.num); this_->pitch=attr->u.num; - transform_set_pitch(this_->trans, ceil(this_->pitch*sqrt(240*320)/sqrt(this_->w*this_->h))); // Pitch corrected for window resolution + transform_set_pitch(this_->trans, round(this_->pitch*sqrt(240*320)/sqrt(this_->w*this_->h))); // Pitch corrected for window resolution if (!init && attr_updated && this_->ready == 3) navit_draw(this_); break; @@ -2836,7 +2836,7 @@ navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, stru attr->u.num=this_->osd_configuration; break; case attr_pitch: - attr->u.num=transform_get_pitch(this_->trans); + attr->u.num=round(transform_get_pitch(this_->trans)*sqrt(this_->w*this_->h)/sqrt(240*320)); // Pitch corrected for window resolution break; case attr_projection: if(this_->trans) { |