This commit is contained in:
Reece Wilson 2023-07-28 08:55:19 +01:00
parent 73548b00d7
commit 4a5cb3c168

View File

@ -74,6 +74,14 @@ namespace Aurora::Compression
SysPushErrorArg("Compressor couldn't set quality");
}
}
else
{
if (!BrotliEncoderSetParameter(this->pState, BrotliEncoderParameter::BROTLI_PARAM_QUALITY, meta.uCompressionLevel))
{
SysPushErrorArg("Compressor couldn't set quality from compression level");
return false;
}
}
if (meta.uOptWindowBits)
{
@ -92,12 +100,6 @@ namespace Aurora::Compression
return false;
}
}
if (!BrotliEncoderSetParameter(this->pState, BrotliEncoderParameter::BROTLI_PARAM_QUALITY, meta.uCompressionLevel))
{
SysPushErrorArg("Compressor couldn't set block size");
return false;
}
for (const auto &[a, b] : meta.options)
{