From 3b980c1a49e8292d5a602f8852c373345fe767e8 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Tue, 9 Jul 2024 18:09:37 +0200 Subject: [PATCH] Fix two import bugs. --- Penumbra/Services/MigrationManager.cs | 1 + Penumbra/UI/Classes/MigrationSectionDrawer.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Penumbra/Services/MigrationManager.cs b/Penumbra/Services/MigrationManager.cs index e377b65e..5b353912 100644 --- a/Penumbra/Services/MigrationManager.cs +++ b/Penumbra/Services/MigrationManager.cs @@ -243,6 +243,7 @@ public class MigrationManager(Configuration config) : IService using var s = new MemoryStream(); using var e = reader.OpenEntryStream(); e.CopyTo(s); + s.Position = 0; using var b = new BinaryReader(s); var version = b.ReadUInt32(); if (version == MdlFile.V5) diff --git a/Penumbra/UI/Classes/MigrationSectionDrawer.cs b/Penumbra/UI/Classes/MigrationSectionDrawer.cs index ec76ddae..d588eaa0 100644 --- a/Penumbra/UI/Classes/MigrationSectionDrawer.cs +++ b/Penumbra/UI/Classes/MigrationSectionDrawer.cs @@ -39,6 +39,7 @@ public class MigrationSectionDrawer(MigrationManager migrationManager, Configura ImUtf8.HoverTooltip("This increments the version marker and restructures the bone table to the new version."u8); + value = config.MigrateImportedMaterialsToLegacy; if (ImUtf8.Checkbox("Automatically Migrate Materials to Dawntrail on Import"u8, ref value)) { config.MigrateImportedMaterialsToLegacy = value;