mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Postproc: Scale pixel deltas and round off screen position. Fixes #8016
This commit is contained in:
1 parent
728d9e51bd
commit
b411fc0455
3 files changed
+22
-24
No files matched your search
@@ -59,16 +59,16 @@ void CenterDisplayOutputRect(float *x, float *y, float *w, float *h, float origW
|
||||
float smallDisplayW = origW * customZoom;
|
||||
float smallDisplayH = origH * customZoom;
|
||||
if (!rotated) {
|
||||
*x = ((frameW - smallDisplayW) / 2.0f) + offsetX;
|
||||
*y = ((frameH - smallDisplayH) / 2.0f) + offsetY;
|
||||
*w = smallDisplayW;
|
||||
*h = smallDisplayH;
|
||||
*x = floorf(((frameW - smallDisplayW) / 2.0f) + offsetX);
|
||||
*y = floorf(((frameH - smallDisplayH) / 2.0f) + offsetY);
|
||||
*w = floorf(smallDisplayW);
|
||||
*h = floorf(smallDisplayH);
|
||||
return;
|
||||
} else {
|
||||
*x = ((frameW - smallDisplayH) / 2.0f) + offsetX;
|
||||
*y = ((frameH - smallDisplayW) / 2.0f) + offsetY;
|
||||
*w = smallDisplayH;
|
||||
*h = smallDisplayW;
|
||||
*x = floorf(((frameW - smallDisplayH) / 2.0f) + offsetX);
|
||||
*y = floorf(((frameH - smallDisplayW) / 2.0f) + offsetY);
|
||||
*w = floorf(smallDisplayH);
|
||||
*h = floorf(smallDisplayW);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -76,9 +76,9 @@ void CenterDisplayOutputRect(float *x, float *y, float *w, float *h, float origW
|
||||
float resCommonWidescreen = pixelCrop - floor(pixelCrop);
|
||||
if (!rotated && resCommonWidescreen == 0.0f) {
|
||||
*x = 0;
|
||||
*y = -pixelCrop;
|
||||
*w = frameW;
|
||||
*h = pixelCrop * 272.0f;
|
||||
*y = floorf(-pixelCrop);
|
||||
*w = floorf(frameW);
|
||||
*h = floorf(pixelCrop * 272.0f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -102,10 +102,10 @@ void CenterDisplayOutputRect(float *x, float *y, float *w, float *h, float origW
|
||||
}
|
||||
}
|
||||
|
||||
*x = (frameW - outW) / 2.0f;
|
||||
*y = (frameH - outH) / 2.0f;
|
||||
*w = outW;
|
||||
*h = outH;
|
||||
*x = floorf((frameW - outW) / 2.0f);
|
||||
*y = floorf((frameH - outH) / 2.0f);
|
||||
*w = floorf(outW);
|
||||
*h = floorf(outH);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user