aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2023-01-23 00:06:23 +0000
committerneonloop2023-01-23 00:06:23 +0000
commit4383b7dad5e24eec8623a81fdb647485b6f4078a (patch)
treec4eeed2d5714695d434a92ccb43cb6b5ea164d76
parent2d94e73539d4ce5de7b998184c2fc0acb23eed1e (diff)
downloadpicoarch-4383b7dad5e24eec8623a81fdb647485b6f4078a.tar.gz
picoarch-4383b7dad5e24eec8623a81fdb647485b6f4078a.tar.bz2
picoarch-4383b7dad5e24eec8623a81fdb647485b6f4078a.zip
Fixes max 320px crop when aspect is not 4:3
-rw-r--r--scale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scale.c b/scale.c
index 7097380..c220aac 100644
--- a/scale.c
+++ b/scale.c
@@ -437,7 +437,7 @@ static void scale_select_scaler(unsigned w, unsigned h, size_t pitch) {
/* For SNES, keep aspect ratio same for hi-res and normal */
src_w = SCREEN_WIDTH * 2;
} else {
- src_w = w / current_aspect_ratio;
+ src_w = w * ((double)SCREEN_WIDTH / (double)320);
}
dst_x = ((src_w - (short)w) / 2);