mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GPU: Correct 1080p/720p crop for ultrawide/similar.
If the display is 1280x1080 or 2560x1080, we don't want to stretch width.
This commit is contained in:
parent
626102e84a
commit
d6affac72d
1 changed files with 4 additions and 3 deletions
|
@ -72,12 +72,13 @@ void CenterDisplayOutputRect(float *x, float *y, float *w, float *h, float origW
|
|||
return;
|
||||
}
|
||||
} else if (g_Config.iSmallDisplayZoomType == 2) { // Auto Scaling
|
||||
// Stretch to 1080 for 272*4. But don't distort if not widescreen (i.e. ultrawide of halfwide.)
|
||||
float pixelCrop = frameH / 270.0f;
|
||||
float resCommonWidescreen = pixelCrop - floor(pixelCrop);
|
||||
if (!rotated && resCommonWidescreen == 0.0f) {
|
||||
*x = 0;
|
||||
if (!rotated && resCommonWidescreen == 0.0f && frameW >= pixelCrop * 480.0f) {
|
||||
*x = floorf((frameW - pixelCrop * 480.0f) * 0.5f);
|
||||
*y = floorf(-pixelCrop);
|
||||
*w = floorf(frameW);
|
||||
*w = floorf(pixelCrop * 480.0f);
|
||||
*h = floorf(pixelCrop * 272.0f);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue