Skip to content

Commit

Permalink
Update src/dllmain.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Lyall <[email protected]>
  • Loading branch information
Drahsid and Lyall authored Feb 15, 2024
1 parent c0d3c7f commit a16bf4b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,9 +751,21 @@ void GraphicalTweaks()

if (iRenTexSizeX == 1920 && iRenTexSizeY == 1080) {
// Seems to affect pause menu screens, has some minor bugs in transitions
float fRenderScale = fScreenPercentage / 100.0f;
iRenTexSizeX = iCustomResX * fRenderScale;
iRenTexSizeY = iCustomResY * fRenderScale;
float fRenderScale = fScreenPercentage / 100.0f;
iRenTexSizeX = iCustomResX * fRenderScale;
iRenTexSizeY = iCustomResY * fRenderScale;

if (fAspectRatio > fNativeAspect)
{
iRenTexSizeX = fHUDWidth * fRenderScale;
iRenTexSizeY = iCustomResY * fRenderScale;
}

if (fAspectRatio < fNativeAspect)
{
iRenTexSizeX = iCustomResX * fRenderScale;
iRenTexSizeY = fHUDHeight * fRenderScale;
}
spdlog::info("Render Texture 2D screen percent: {:f}, {:d}x{:d}", fRenderScale, iCustomResX, iCustomResY);
}
else if (iRenTexSizeX > iRenTexSizeY) {
Expand Down

0 comments on commit a16bf4b

Please sign in to comment.