diff options
author | Johan FitiƩ <jfitie@gmail.com> | 2017-07-27 22:03:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 22:03:34 +0200 |
commit | d50f92b2b06caa6b2105999d71d61a723e41ee32 (patch) | |
tree | 9da7bf87cc04cd471132b2e2847e58780cf5df7c | |
parent | b67baccda6eca4ccd246cb262cd50a04b4e7ee0f (diff) | |
download | navit-d50f92b2b06caa6b2105999d71d61a723e41ee32.tar.gz |
Pitch correction (#303)
* Initial commit
* First try
* Use solution as default
* Add comment and debug log message
* More technically correct
* Move logic to transform
* Fix
* Do not round as we're using a double now
* Even simpler
* Fix
* Use typedefs
* No typedefs
* Simplify
* Moar simple
* Simple math
* Static value and comment
* Variables for w and h
* w,h im transform_new
* No rounding errors
* Log w and h
* Typo
* Define default resolution
* Remove comment
* Move logic
* Unused variable cleanup
* Do not change pitch if not in 3d mode
* Round integer
* Move logic again
* Round up
* [POI] Resize SVG icons to 22x22 (#304)
* Initial commit
* First try
* Use solution as default
* Add comment and debug log message
* More technically correct
* Move logic to transform
* Fix
* Do not round as we're using a double now
* Even simpler
* Fix
* Use typedefs
* No typedefs
* Simplify
* Moar simple
* Simple math
* Static value and comment
* Variables for w and h
* w,h im transform_new
* No rounding errors
* Log w and h
* Typo
* Define default resolution
* Remove comment
* Move logic
* Unused variable cleanup
* Do not change pitch if not in 3d mode
* Round integer
* Move logic again
* Round up
-rw-r--r-- | navit/navit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/navit.c b/navit/navit.c index 42fb74dab..120b96049 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, this_->pitch); + transform_set_pitch(this_->trans, ceil(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; |