fix: add back compat functionality to the AudioBackend enum as well, and add missing migration comment from config version 70

This commit is contained in:
GreemDev 2025-11-07 22:21:06 -06:00
parent 844d7a9cfe
commit ed89ffd3f8
4 changed files with 12 additions and 2 deletions

View file

@ -957,6 +957,9 @@ namespace Ryujinx.Ava.Systems
AudioBackend preferredBackend = ConfigurationState.Instance.System.AudioBackend.Value;
if (preferredBackend is AudioBackend.SDL2)
preferredBackend = AudioBackend.SDL3;
for (int i = 0; i < availableBackends.Count; i++)
{
if (availableBackends[i] == preferredBackend)

View file

@ -10,5 +10,6 @@ namespace Ryujinx.Ava.Systems.Configuration
OpenAl,
SoundIo,
SDL3,
SDL2 = SDL3
}
}

View file

@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Systems.Configuration
/// <summary>
/// The current version of the file format
/// </summary>
public const int CurrentVersion = 70;
public const int CurrentVersion = 71;
/// <summary>
/// Version of the configuration file format

View file

@ -484,7 +484,13 @@ namespace Ryujinx.Ava.Systems.Configuration
};
}
),
(69, static cff => cff.SkipUserProfiles = false)
(69, static cff => cff.SkipUserProfiles = false),
// no migration needed for 70
(71, static cff =>
{
if (cff.AudioBackend is AudioBackend.SDL2)
cff.AudioBackend = AudioBackend.SDL3;
})
);
}
}