pixel perfect upscale
This commit is contained in:
parent
49d6b57dd0
commit
2dad06ba4c
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue