From 8cb281bf42e968bc3c36ca192b52e5ab1b4bb9e2 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 22 Jul 2018 12:07:46 -0400 Subject: [PATCH] - fixed: I misnamed the function in my last commit, it should've been called 'min' not 'max' --- src/r_videoscale.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_videoscale.cpp b/src/r_videoscale.cpp index b0deebd7f..a1f4b1170 100644 --- a/src/r_videoscale.cpp +++ b/src/r_videoscale.cpp @@ -101,7 +101,7 @@ bool ViewportLinearScale() return (vid_scalefactor > 1.0) ? true : vScaleTable[vid_scalemode].isLinear; } -inline int max(int a, int b) +inline int min(int a, int b) { return (a < b) ? a : b; } @@ -112,7 +112,7 @@ int ViewportScaledWidth(int width, int height) vid_scalemode = 0; if (vid_cropaspect && height > 0) width = ((float)width/height > ActiveRatio(width, height)) ? (int)(height * ActiveRatio(width, height)) : width; - return max(320, vScaleTable[vid_scalemode].GetScaledWidth((int)((float)width * vid_scalefactor))); + return min(320, vScaleTable[vid_scalemode].GetScaledWidth((int)((float)width * vid_scalefactor))); } int ViewportScaledHeight(int width, int height) @@ -121,7 +121,7 @@ int ViewportScaledHeight(int width, int height) vid_scalemode = 0; if (vid_cropaspect && height > 0) height = ((float)width/height < ActiveRatio(width, height)) ? (int)(width / ActiveRatio(width, height)) : height; - return max(200, vScaleTable[vid_scalemode].GetScaledHeight((int)((float)height * vid_scalefactor))); + return min(200, vScaleTable[vid_scalemode].GetScaledHeight((int)((float)height * vid_scalefactor))); } bool ViewportIsScaled43()