diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-20 15:17:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-20 15:17:14 +0100 |
commit | 833ba009037ebec6dcce1688b9bfd59ae1049304 (patch) | |
tree | 5acebe147ec1d26b83c76a67b063479b6512f9a1 /serialize/anim.cpp | |
parent | e1c4111a106482b55e6ff82b12d64f4fedb18347 (diff) |
anim-crop-tool: fix fixed width/height scaling
Diffstat (limited to 'serialize/anim.cpp')
-rw-r--r-- | serialize/anim.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize/anim.cpp b/serialize/anim.cpp index c5a6418b..8d867489 100644 --- a/serialize/anim.cpp +++ b/serialize/anim.cpp @@ -135,11 +135,11 @@ void adl_serializer<floormat::anim_scale>::from_json(const json& j, floormat::an { auto factor = (float)j[1]; fm_soft_assert(factor > 0 && factor <= 1); - val = {factor}; + val = anim_scale::ratio{factor}; } else if (bool is_width = type == "width"_s; is_width || type == "height"_s) { - val = {(unsigned)j[1], is_width}; + val = anim_scale::fixed{(unsigned)j[1], is_width}; fm_soft_assert(val.f.width_or_height > 0); } else |