mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 19:45:13 +00:00
Fix AstcDecoder Success property never being set to true
This commit is contained in:
parent
654e617fe7
commit
53bbc1311f
1 changed files with 9 additions and 2 deletions
|
@ -32,9 +32,14 @@ namespace Ryujinx.Graphics.Texture.Astc
|
||||||
int depth,
|
int depth,
|
||||||
int levels)
|
int levels)
|
||||||
{
|
{
|
||||||
if ((uint)blockWidth > 12 || (uint)blockHeight > 12)
|
if ((uint)blockWidth > 12)
|
||||||
{
|
{
|
||||||
throw new AstcDecoderException("Invalid block size.");
|
throw new ArgumentOutOfRangeException(nameof(blockWidth));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((uint)blockHeight > 12)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(blockHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
InputBuffer = inputBuffer;
|
InputBuffer = inputBuffer;
|
||||||
|
@ -45,6 +50,8 @@ namespace Ryujinx.Graphics.Texture.Astc
|
||||||
|
|
||||||
Levels = new AstcLevel[levels];
|
Levels = new AstcLevel[levels];
|
||||||
|
|
||||||
|
Success = true;
|
||||||
|
|
||||||
TotalBlockCount = 0;
|
TotalBlockCount = 0;
|
||||||
|
|
||||||
int currentInputBlock = 0;
|
int currentInputBlock = 0;
|
||||||
|
|
Loading…
Reference in a new issue