pixel perfect upscale

This commit is contained in:
kdx 2023-03-19 05:50:07 +00:00
parent 49d6b57dd0
commit 2dad06ba4c
1 changed files with 2 additions and 0 deletions

View File

@ -671,6 +671,8 @@ int LZY_DrawEnd(void) {
ratio_w = (float)win_w / LZY_DISPLAY_WIDTH;
ratio_h = (float)win_h / LZY_DISPLAY_HEIGHT;
scale = (ratio_w < ratio_h) ? (ratio_w) : (ratio_h);
if (scale > 1.0)
scale = (int)scale;
off_x = (win_w - LZY_DISPLAY_WIDTH * scale) / 2;
off_y = (win_h - LZY_DISPLAY_HEIGHT * scale) / 2;