aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-29 14:48:26 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit53bbc1311f9819ac70fd51ae016e8c2070268086 (patch)
treea443a5c5ce4cec84bb7028624f6e533819bb6806
parent654e617fe78b0f5cc86d0bcf0625301abff168f5 (diff)
Fix AstcDecoder Success property never being set to true
-rw-r--r--Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
index 4ba332d0..74623b38 100644
--- a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
+++ b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
@@ -32,9 +32,14 @@ namespace Ryujinx.Graphics.Texture.Astc
int depth,
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;
@@ -45,6 +50,8 @@ namespace Ryujinx.Graphics.Texture.Astc
Levels = new AstcLevel[levels];
+ Success = true;
+
TotalBlockCount = 0;
int currentInputBlock = 0;