mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
3.0.6.2 - Fix backwards compatability build introduced in 3.0.6.1
This commit is contained in:
parent
bafbb75d4a
commit
3587b188e0
@ -1,5 +1,9 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 3.0.6.2 - 1/28/2023
|
||||
* Add fallback for DDS compression when installing older lists. This should keep older DDS files from not being compressed without any mipmaps at all.
|
||||
*
|
||||
|
||||
#### Version - 3.0.6.1 - 1/28/2023
|
||||
* Game support:
|
||||
* Added Mount & Blade II: Bennerlord support (Steam,GOG)
|
||||
|
@ -46,8 +46,9 @@ public class FileLoadingTests : IAsyncDisposable
|
||||
{
|
||||
foreach (var imageLoader in _imageLoaders)
|
||||
{
|
||||
var inputFile = "TestData/test-dxt5.dds".ToRelativePath().RelativeTo(KnownFolders.EntryPoint);
|
||||
var baseState =
|
||||
await imageLoader.Load("TestData/test-dxt5.dds".ToRelativePath().RelativeTo(KnownFolders.EntryPoint));
|
||||
await imageLoader.Load(inputFile);
|
||||
var state = await imageLoader.Load("TestData".ToRelativePath().Combine(file)
|
||||
.RelativeTo(KnownFolders.EntryPoint));
|
||||
|
||||
@ -58,6 +59,9 @@ public class FileLoadingTests : IAsyncDisposable
|
||||
new Digest { Coefficients = baseState.PerceptualHash.Data },
|
||||
new Digest { Coefficients = state.PerceptualHash.Data }),
|
||||
1.0);
|
||||
|
||||
await using var outFile = _tmp.CreateFile();
|
||||
await imageLoader.Recompress(inputFile, 64, 64, 0, DXGI_FORMAT.BC7_UNORM, outFile, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class CrossPlatformImageLoader : IImageLoader
|
||||
GenerateMipMaps = true,
|
||||
Format = ToCompressionFormat(format),
|
||||
FileFormat = OutputFileFormat.Dds,
|
||||
MaxMipMapLevel = mipMaps
|
||||
MaxMipMapLevel = mipMaps != 0 ? mipMaps : -1
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -83,11 +83,29 @@ public class TexConvImageLoader : IImageLoader
|
||||
|
||||
public async Task ConvertImage(AbsolutePath from, AbsolutePath toFolder, int w, int h, int mipMaps, DXGI_FORMAT format, Extension fileFormat)
|
||||
{
|
||||
object[] args;
|
||||
if (mipMaps != 0)
|
||||
{
|
||||
args = new object[]
|
||||
{
|
||||
from, "-ft", fileFormat.ToString()[1..], "-f", format, "-o", toFolder, "-w", w, "-h", h, "-m", mipMaps,
|
||||
"-if", "CUBIC", "-singleproc"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
args = new object[]
|
||||
{
|
||||
from, "-ft", fileFormat.ToString()[1..], "-f", format, "-o", toFolder, "-w", w, "-h", h,
|
||||
"-if", "CUBIC", "-singleproc"
|
||||
};
|
||||
}
|
||||
|
||||
// User isn't renaming the file, so we don't have to create a temporary folder
|
||||
var ph = new ProcessHelper
|
||||
{
|
||||
Path = @"Tools\texconv.exe".ToRelativePath().RelativeTo(KnownFolders.EntryPoint),
|
||||
Arguments = new object[] {from, "-ft", fileFormat.ToString()[1..], "-f", format, "-o", toFolder, "-w", w, "-h", h, "-m", mipMaps, "-if", "CUBIC", "-singleproc"},
|
||||
Arguments = args,
|
||||
ThrowOnNonZeroExitCode = true,
|
||||
LogError = true
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user