16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 06:59:18 +02:00

Refactor clamp_power_of_two

This commit is contained in:
docentYT
2026-05-02 00:35:50 +02:00
parent 76844e33e7
commit 28baad8c5b
4 changed files with 15 additions and 15 deletions

View File

@@ -284,17 +284,17 @@ bool global_settings::ConfigParseGraphics(cParser& Parser, const std::string& to
if (token == "maxtexturesize")
{
int size = 0;
unsigned int size = 0;
ParseOne(Parser, size, 1, false);
iMaxTextureSize = clamp_power_of_two(size, 64, 8192);
iMaxTextureSize = static_cast<GLint>(clamp_power_of_two(size, 64u, 8192u));
return true;
}
if (token == "maxcabtexturesize")
{
int size = 0;
unsigned int size = 0;
ParseOne(Parser, size, 1, false);
iMaxCabTextureSize = clamp_power_of_two(size, 512, 8192);
iMaxCabTextureSize = static_cast<GLint>(clamp_power_of_two(size, 512u, 8192u));
return true;
}