mirror of
https://github.com/hykilpikonna/AquaDX.git
synced 2026-04-25 15:37:35 -05:00
28 lines
786 B
C#
28 lines
786 B
C#
using AquaMai.Config.Interfaces;
|
|
using Tomlet.Models;
|
|
|
|
namespace AquaMai.Config.Migration;
|
|
|
|
public class ConfigMigration_V2_3_V2_4 : IConfigMigration
|
|
{
|
|
public string FromVersion => "2.3";
|
|
public string ToVersion => "2.4";
|
|
|
|
public ConfigView Migrate(ConfigView src)
|
|
{
|
|
var dst = (ConfigView)src.Clone();
|
|
dst.SetValue("Version", ToVersion);
|
|
|
|
if (src.TryGetValue<bool>("GameSystem.KeyMap.DisableIO4", out var disableIO4))
|
|
{
|
|
dst.SetValue("GameSystem.KeyMap.DisableIO4_1P", disableIO4);
|
|
dst.SetValue("GameSystem.KeyMap.DisableIO4_2P", disableIO4);
|
|
dst.SetValue("GameSystem.KeyMap.DisableIO4System", disableIO4);
|
|
dst.Remove("GameSystem.KeyMap.DisableIO4");
|
|
}
|
|
|
|
return dst;
|
|
}
|
|
}
|
|
|