Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): increase number of low res camera options
Browse files Browse the repository at this point in the history
partially revert behaviour of 04ecfe3 to show any options that were shown before. Mentioned in comments of #5097.
  • Loading branch information
anthonybilinski committed Apr 24, 2018
1 parent 4419317 commit 7293151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/videomode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ uint32_t VideoMode::norm(const VideoMode& other) const

uint32_t VideoMode::tolerance() const
{
constexpr uint32_t minTolerance = 300; // keep wider tolerance for low res cameras
constexpr uint32_t toleranceFactor = 10; // video mode must be within 10% to be "close enough" to ideal
return (width + height)/toleranceFactor;
return std::max((width + height)/toleranceFactor, minTolerance);
}

/**
Expand Down

0 comments on commit 7293151

Please sign in to comment.