mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-15 08:31:03 +00:00
TexMgr_SafeTextureSize: don't use function calls from q_min() macro
This commit is contained in:
parent
6c9bde021c
commit
35b2d77661
1 changed files with 5 additions and 2 deletions
|
@ -672,10 +672,13 @@ TexMgr_SafeTextureSize -- return a size with hardware and user prefs in mind
|
||||||
*/
|
*/
|
||||||
int TexMgr_SafeTextureSize (int s)
|
int TexMgr_SafeTextureSize (int s)
|
||||||
{
|
{
|
||||||
|
int p = (int)gl_max_size.value;
|
||||||
if (!gl_texture_NPOT)
|
if (!gl_texture_NPOT)
|
||||||
s = TexMgr_Pad(s);
|
s = TexMgr_Pad(s);
|
||||||
if ((int)gl_max_size.value > 0)
|
if (p > 0) {
|
||||||
s = q_min(TexMgr_Pad((int)gl_max_size.value), s);
|
p = TexMgr_Pad(p);
|
||||||
|
if (p < s) s = p;
|
||||||
|
}
|
||||||
s = q_min(gl_hardware_maxsize, s);
|
s = q_min(gl_hardware_maxsize, s);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue