summaryrefslogtreecommitdiff
path: root/src/lzy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lzy.h')
-rw-r--r--src/lzy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lzy.h b/src/lzy.h
index 3fbfc24..22c7723 100644
--- a/src/lzy.h
+++ b/src/lzy.h
@@ -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;