Add back the old stretch-if-close-to-16:9 hack

This commit is contained in:
Henrik Rydgård committed 2022-11-27 16:16:18 +01:00
1 parent bdfde4cbac
commit d667bd84a3
1 file changed
+8
+8
View File
@@ -96,6 +96,14 @@ void CenterDisplayOutputRect(FRect *rc, float origW, float origH, const FRect &f
aspectRatioAdjust = 1.0f;
}
// Ye olde 1080p hack, new version: If everything is setup to exactly cover the screen (defaults), and the screen display aspect ratio is 16:9,
// stretch the PSP's aspect ratio veeery slightly to fill it completely.
if (scale == 1.0f && offsetX == 0.5f && offsetY == 0.5f && aspectRatioAdjust == 1.0f) {
if (fabsf(frame.w / frame.h - 16.0f / 9.0f) < 0.0001f) {
aspectRatioAdjust = (frame.w / frame.h) / (480.0f / 272.0f);
}
}
float origRatio = !rotated ? origW / origH : origH / origW;
float frameRatio = frame.w / frame.h;