diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 8b85bce7c5..0127c86271 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -2046,7 +2046,7 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o return 0; case EMULATOR_DEVCTL__GET_ASPECT_RATIO: if (Memory::IsValidAddress(outPtr)) { - // TODO: Share code with CenterDisplayOutputRect to take a few more things into account. + // TODO: Share code with CalculateDisplayOutputRect to take a few more things into account. // I have a planned further refactoring. float ar; if (g_Config.bDisplayStretch) { diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index d5a81de09c..60a7fd5a63 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -1192,7 +1192,7 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int flags = flags | DRAWTEX_TO_BACKBUFFER; FRect frame = GetScreenFrame(pixelWidth_, pixelHeight_); FRect rc; - CenterDisplayOutputRect(&rc, 480.0f, 272.0f, frame, ROTATION_LOCKED_HORIZONTAL); + CalculateDisplayOutputRect(&rc, 480.0f, 272.0f, frame, ROTATION_LOCKED_HORIZONTAL); SetViewport2D(rc.x, rc.y, rc.w, rc.h); draw_->SetScissorRect(0, 0, pixelWidth_, pixelHeight_); } diff --git a/GPU/Common/GPUStateUtils.cpp b/GPU/Common/GPUStateUtils.cpp index d223283e3f..bf88169454 100644 --- a/GPU/Common/GPUStateUtils.cpp +++ b/GPU/Common/GPUStateUtils.cpp @@ -583,7 +583,7 @@ void ConvertViewportAndScissor(bool useBufferedRendering, float renderWidth, flo float pixelH = PSP_CoreParameter().pixelHeight; FRect frame = GetScreenFrame(pixelW, pixelH); FRect rc; - CenterDisplayOutputRect(&rc, 480, 272, frame, ROTATION_LOCKED_HORIZONTAL); + CalculateDisplayOutputRect(&rc, 480, 272, frame, ROTATION_LOCKED_HORIZONTAL); displayOffsetX = rc.x; displayOffsetY = rc.y; renderWidth = rc.w; diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index ac3cc52ba1..7ad8ee9db0 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -68,7 +68,7 @@ FRect GetScreenFrame(float pixelWidth, float pixelHeight) { return rc; } -void CenterDisplayOutputRect(FRect *rc, float origW, float origH, const FRect &frame, int rotation) { +void CalculateDisplayOutputRect(FRect *rc, float origW, float origH, const FRect &frame, int rotation) { float outW; float outH; @@ -368,7 +368,7 @@ bool PresentationCommon::BuildPostShader(const ShaderInfo * shaderInfo, const Sh // If the current shader uses output res (not next), we will use output res for it. FRect rc; FRect frame = GetScreenFrame((float)pixelWidth_, (float)pixelHeight_); - CenterDisplayOutputRect(&rc, 480.0f, 272.0f, frame, g_Config.iInternalScreenRotation); + CalculateDisplayOutputRect(&rc, 480.0f, 272.0f, frame, g_Config.iInternalScreenRotation); nextWidth = (int)rc.w; nextHeight = (int)rc.h; } @@ -644,7 +644,7 @@ void PresentationCommon::CopyToOutput(OutputFlags flags, int uvRotation, float u pixelWidth /= 2; } FRect rc; - CenterDisplayOutputRect(&rc, 480.0f, 272.0f, frame, uvRotation); + CalculateDisplayOutputRect(&rc, 480.0f, 272.0f, frame, uvRotation); if (GetGPUBackend() == GPUBackend::DIRECT3D9) { rc.x -= 0.5f; diff --git a/GPU/Common/PresentationCommon.h b/GPU/Common/PresentationCommon.h index 981c707b05..1bb4ff008a 100644 --- a/GPU/Common/PresentationCommon.h +++ b/GPU/Common/PresentationCommon.h @@ -48,7 +48,7 @@ struct FRect { }; FRect GetScreenFrame(float pixelWidth, float pixelHeight); -void CenterDisplayOutputRect(FRect *rc, float origW, float origH, const FRect &frame, int rotation); +void CalculateDisplayOutputRect(FRect *rc, float origW, float origH, const FRect &frame, int rotation); namespace Draw { class Buffer; diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 0ed5ea43da..2f2c528286 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -134,7 +134,7 @@ void DisplayLayoutScreen::DrawBackground(UIContext &dc) { // TODO: Clean this up a bit, this GetScreenFrame/CenterDisplay combo is too common. FRect screenFrame = GetScreenFrame(g_display.pixel_xres, g_display.pixel_yres); FRect rc; - CenterDisplayOutputRect(&rc, 480.0f, 272.0f, screenFrame, g_Config.iInternalScreenRotation); + CalculateDisplayOutputRect(&rc, 480.0f, 272.0f, screenFrame, g_Config.iInternalScreenRotation); dc.Flush(); ImageID bg = ImageID("I_PSP_DISPLAY");