Attempted fix for 4:3 integer scale.

This commit is contained in:
OBattler
2023-10-16 01:41:57 +02:00
parent b1a4bc9c53
commit b5a6824a9b

View File

@@ -80,6 +80,18 @@ RendererCommon::onResize(int width, int height)
case FULLSCR_SCALE_INT43: case FULLSCR_SCALE_INT43:
gsr = gw / gh; gsr = gw / gh;
if (video_fullscreen_scale == FULLSCR_SCALE_INT43) {
if (r43 <= gsr) {
gw = gh * r43;
gh = gh;
} else {
gh = gw / r43;
gw = gw;
}
gsr = r43;
}
if (gsr <= hsr) { if (gsr <= hsr) {
dw = hh * gsr; dw = hh * gsr;
dh = hh; dh = hh;
@@ -91,16 +103,6 @@ RendererCommon::onResize(int width, int height)
integer_scale(&dw, &gw); integer_scale(&dw, &gw);
integer_scale(&dh, &gh); integer_scale(&dh, &gh);
if (video_fullscreen_scale == FULLSCR_SCALE_INT43) {
if (r43 <= gsr) {
dw = dh * r43;
dh = dh;
} else {
dh = dw / r43;
dw = dw;
}
}
dx = (hw - dw) / 2.0; dx = (hw - dw) / 2.0;
dy = (hh - dh) / 2.0; dy = (hh - dh) / 2.0;
destination.setRect((int) dx, (int) dy, (int) dw, (int) dh); destination.setRect((int) dx, (int) dy, (int) dw, (int) dh);