1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): increase number of low res camera options

partially revert behaviour of 04ecfe3f34 to show any options that were shown before. Mentioned in comments of #5097.
This commit is contained in:
Anthony Bilinski 2018-04-24 02:23:05 -07:00
parent 441931765f
commit 7293151469
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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);
}
/**