Enable scaling (updated) sandbox/ruke47/scaling
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Thu, 17 May 2018 02:33:43 +0000 (02:33 +0000)
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Thu, 17 May 2018 02:33:43 +0000 (02:33 +0000)
Fix scaling based width.

Change-Id: I9b22f18ae184f014097012c917137ed982e74668
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
src/util.cpp

index 068e7b8..1fb6ac8 100644 (file)
@@ -55,7 +55,7 @@ void rectangle::scale(int to_w, int to_h, bool keep_aspect)
   } else {
     /* use aspect by width */
     w = to_h;
-    h = int64_t(to_h) * int64_t(h) / int64_t(w);
+    h = int64_t(to_w) * int64_t(h) / int64_t(w);
   }
 }