mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-21 18:21:13 +02:00
Migrate custom settings for SDL2 to SDL3
This commit is contained in:
@@ -3,7 +3,7 @@ using Avalonia.Media.Imaging;
|
||||
using Avalonia.Threading;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ryujinx.Audio.Backends.OpenAL;
|
||||
using Ryujinx.Audio.Backends.SDL2;
|
||||
using Ryujinx.Audio.Backends.SDL3;
|
||||
using Ryujinx.Audio.Backends.SoundIo;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
@@ -155,7 +155,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
// Audio settings
|
||||
public bool IsOpenAlEnabled { get; set; }
|
||||
public bool IsSoundIoEnabled { get; set; }
|
||||
public bool IsSDL2Enabled { get; set; }
|
||||
public bool IsSDL3Enabled { get; set; }
|
||||
public AudioBackend AudioBackend { get; set; }
|
||||
|
||||
public float Volume
|
||||
@@ -196,13 +196,13 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
IsOpenAlEnabled = OpenALHardwareDeviceDriver.IsSupported;
|
||||
IsSoundIoEnabled = SoundIoHardwareDeviceDriver.IsSupported;
|
||||
IsSDL2Enabled = SDL2HardwareDeviceDriver.IsSupported;
|
||||
IsSDL3Enabled = SDL3HardwareDeviceDriver.IsSupported;
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
OnPropertyChanged(nameof(IsOpenAlEnabled));
|
||||
OnPropertyChanged(nameof(IsSoundIoEnabled));
|
||||
OnPropertyChanged(nameof(IsSDL2Enabled));
|
||||
OnPropertyChanged(nameof(IsSDL3Enabled));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
IsEnabled="{Binding IsSoundIoEnabled}"
|
||||
Content="{locale:Locale SettingsTabSystemAudioBackendSoundIO}" />
|
||||
<ComboBoxItem
|
||||
IsEnabled="{Binding IsSDL2Enabled}"
|
||||
Content="{locale:Locale SettingsTabSystemAudioBackendSDL2}" />
|
||||
IsEnabled="{Binding IsSDL3Enabled}"
|
||||
Content="{locale:Locale SettingsTabSystemAudioBackendSDL3}" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
|
||||
Reference in New Issue
Block a user