mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixes for FO4EE recompilation
This commit is contained in:
parent
ee9b61be12
commit
5d04d1336d
@ -21,6 +21,7 @@ using Wabbajack.Common;
|
||||
using Wabbajack.Compiler;
|
||||
using Wabbajack.DTOs;
|
||||
using Wabbajack.DTOs.JsonConverters;
|
||||
using Wabbajack.Installer;
|
||||
using Wabbajack.Models;
|
||||
using Wabbajack.Networking.WabbajackClientApi;
|
||||
using Wabbajack.Paths;
|
||||
@ -249,17 +250,25 @@ namespace Wabbajack
|
||||
|
||||
var compiler = MO2Compiler.Create(_serviceProvider, mo2Settings);
|
||||
|
||||
compiler.OnStatusUpdate += (sender, update) =>
|
||||
{
|
||||
RxApp.MainThreadScheduler.Schedule(update, (scheduler, update) =>
|
||||
var events = Observable.FromEventPattern<StatusUpdate>(h => compiler.OnStatusUpdate += h,
|
||||
h => compiler.OnStatusUpdate -= h)
|
||||
.Throttle(TimeSpan.FromSeconds(0.5))
|
||||
.ObserveOnGuiThread()
|
||||
.Subscribe(update =>
|
||||
{
|
||||
StatusText = update.StatusText;
|
||||
StatusProgress = update.StepsProgress;
|
||||
return Disposable.Empty;
|
||||
StatusText = update.EventArgs.StatusText;
|
||||
StatusProgress = update.EventArgs.StepsProgress;
|
||||
});
|
||||
};
|
||||
|
||||
await compiler.Begin(token);
|
||||
|
||||
try
|
||||
{
|
||||
await compiler.Begin(token);
|
||||
}
|
||||
finally
|
||||
{
|
||||
events.Dispose();
|
||||
}
|
||||
|
||||
if (PublishUpdate)
|
||||
{
|
||||
|
@ -392,6 +392,7 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskBarUpdate.Send($"Error during install of {ModList.Name}", TaskbarItemProgressState.Error);
|
||||
_logger.LogError(ex, ex.Message);
|
||||
InstallState = InstallState.Failure;
|
||||
StatusText = $"Error during install of {ModList.Name}";
|
||||
StatusProgress = Percent.Zero;
|
||||
|
@ -106,6 +106,7 @@ public class ImageLoader
|
||||
DXGI_FORMAT.BC5_UNORM => CompressionFormat.Bc5,
|
||||
DXGI_FORMAT.BC7_UNORM => CompressionFormat.Bc7,
|
||||
DXGI_FORMAT.B8G8R8A8_UNORM => CompressionFormat.Bgra,
|
||||
DXGI_FORMAT.R8G8B8A8_UNORM => CompressionFormat.Rgba,
|
||||
_ => throw new Exception($"Cannot re-encode texture with {dx} format, encoding not supported")
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user