mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-06 13:22:36 +08:00
Use condition instead of assertion #5030
This commit is contained in:
@@ -39,14 +39,14 @@ void DpiHelper::calculateDpi(size_t width, size_t height)
|
||||
size_t dpiTest1 = s_resolutionWidth * 100 / width;
|
||||
size_t dpiTest2 = s_resolutionHeight * 100 / height;
|
||||
|
||||
assert(dpiTest1 == dpiTest2);
|
||||
if (dpiTest1 == dpiTest2) {
|
||||
s_dpi = dpiTest1;
|
||||
|
||||
s_dpi = dpiTest1;
|
||||
if (s_dpi != kDefaultDpi) {
|
||||
s_dpiScaled = true;
|
||||
|
||||
if (s_dpi != kDefaultDpi) {
|
||||
s_dpiScaled = true;
|
||||
|
||||
LOG((CLOG_DEBUG "DPI: %d%%", s_dpi));
|
||||
LOG((CLOG_DEBUG "physical resolution: %d, %d scaled resolution: %d, %d", s_resolutionWidth, s_resolutionHeight, width, height));
|
||||
}
|
||||
LOG((CLOG_DEBUG "DPI: %d%%", s_dpi));
|
||||
LOG((CLOG_DEBUG "physical resolution: %d, %d scaled resolution: %d, %d", s_resolutionWidth, s_resolutionHeight, width, height));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user