Skip to content

Commit 179539c

Browse files
committed
Display: rounds scaled size when calcuating
Follows f50059d
1 parent 6d73ecb commit 179539c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/modules/display/display.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ bool ffPrintDisplay(FFDisplayOptions* options)
4545
}
4646
else
4747
{
48-
uint32_t scaledWidth = result->width * 96 / result->dpi;
49-
uint32_t scaledHeight = result->height * 96 / result->dpi;
48+
uint32_t scaledWidth = (result->width * 96 + result->dpi / 2) / result->dpi;
49+
uint32_t scaledHeight = (result->height * 96 + result->dpi / 2) / result->dpi;
5050
ffStrbufAppendF(&buffer, "%ix%i", scaledWidth, scaledHeight);
5151
}
5252

0 commit comments

Comments
 (0)