- Replace MIN() from templates.h with version provided in STL.

This commit is contained in:
Mitch Richters 2021-10-30 19:21:43 +11:00 committed by Christoph Oelckers
parent 9894729fc2
commit b02a6a3ec9
57 changed files with 145 additions and 164 deletions

View file

@ -186,7 +186,7 @@ void DFrameBuffer::SetViewportRects(IntRect *bounds)
int screenWidth = GetWidth();
int screenHeight = GetHeight();
float scaleX, scaleY;
scaleX = std::min(clientWidth / (float)screenWidth, clientHeight / ((float)screenHeight * ViewportPixelAspect()));
scaleX = min(clientWidth / (float)screenWidth, clientHeight / ((float)screenHeight * ViewportPixelAspect()));
scaleY = scaleX * ViewportPixelAspect();
mOutputLetterbox.width = (int)round(screenWidth * scaleX);
mOutputLetterbox.height = (int)round(screenHeight * scaleY);