Skip to content

Commit

Permalink
Aspect ratios shouldn't contain zero
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Nov 6, 2024
1 parent c755749 commit 3d280bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/miral/window_info_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ miral::Height const miral::default_max_height{std::numeric_limits<int>::max()};
miral::DeltaX const miral::default_width_inc{1};
miral::DeltaY const miral::default_height_inc{1};
miral::WindowInfo::AspectRatio const miral::default_min_aspect_ratio{
clamp(WindowInfo::AspectRatio{0U, std::numeric_limits<unsigned>::max()})};
clamp(WindowInfo::AspectRatio{1U, std::numeric_limits<unsigned>::max()})};
miral::WindowInfo::AspectRatio const miral::default_max_aspect_ratio{
clamp(WindowInfo::AspectRatio{std::numeric_limits<unsigned>::max(), 0U})};
clamp(WindowInfo::AspectRatio{std::numeric_limits<unsigned>::max(), 1U})};

miral::WindowInfo::Self::Self(Window window, WindowSpecification const& params) :
window{window},
Expand Down

0 comments on commit 3d280bd

Please sign in to comment.