summaryrefslogtreecommitdiff
path: root/LUT.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LUT.cs')
-rw-r--r--LUT.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/LUT.cs b/LUT.cs
index 941e4a6..a037618 100644
--- a/LUT.cs
+++ b/LUT.cs
@@ -157,11 +157,10 @@ namespace WorldTuningTool
fixed (byte *dataPointer = (byte[])data)
{
// DXGI_FORMAT_R16G16B16A16_FLOAT = 10
- return new Texture(texture).Replace(dataPointer, 10, 32, 32, 32);
+ new Texture(texture).Replace(dataPointer, 10, 32, 32, 32);
}
-#else
- return true;
#endif
+ return true;
}
private static bool overwriteFromFile(nint texture, string path)
@@ -176,13 +175,10 @@ namespace WorldTuningTool
private static bool overwriteFromMtFile(nint texture, string path)
{
MtFileStream? file = MtFileStream.FromPath(path, OpenMode.Read, false);
- bool success = false;
- if (file != null)
- {
- success = overwriteFromStream(texture, new MemoryStream(file.Read(file.Length)));
- file.Close();
- }
- return success;
+ if (file == null) return false;
+ MemoryStream stream = new MemoryStream(file.Read(file.Length));
+ file.Close();
+ return overwriteFromStream(texture, stream);
}
private static void reloadBlendLut(nint lightingObject)