From 9aec3e9e7750803e5626da3d01d7e57fabe19f65 Mon Sep 17 00:00:00 2001 From: VocalFan <45863583+Mou-Ikkai@users.noreply.github.com> Date: Sun, 22 Aug 2021 02:29:58 -0400 Subject: [PATCH] Resolve elses. --- Ryujinx/Ui/MainWindow.cs | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index d0fccddb8..fbaa96df9 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -425,16 +425,16 @@ namespace Ryujinx.Ui else { Logger.Warning?.Print(LogClass.Audio, "OpenAL is not supported, trying to fall back to SoundIO."); - } + + if (SoundIoHardwareDeviceDriver.IsSupported) + { + Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration."); - if (SoundIoHardwareDeviceDriver.IsSupported) - { - Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration."); + ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SoundIo; + SaveConfig(); - ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SoundIo; - SaveConfig(); - - deviceDriver = new SoundIoHardwareDeviceDriver(); + deviceDriver = new SoundIoHardwareDeviceDriver(); + } } else { @@ -464,16 +464,16 @@ namespace Ryujinx.Ui else { Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to OpenAL."); - } + + if (OpenALHardwareDeviceDriver.IsSupported) + { + Logger.Warning?.Print(LogClass.Audio, "Found OpenAL, changing configuration."); - if (OpenALHardwareDeviceDriver.IsSupported) - { - Logger.Warning?.Print(LogClass.Audio, "Found OpenAL, changing configuration."); + ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.OpenAl; + SaveConfig(); - ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.OpenAl; - SaveConfig(); - - deviceDriver = new OpenALHardwareDeviceDriver(); + deviceDriver = new OpenALHardwareDeviceDriver(); + } } else { @@ -503,16 +503,15 @@ namespace Ryujinx.Ui else { Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to SoundIO."); - } - - if (SoundIoHardwareDeviceDriver.IsSupported) - { - Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration."); + if (SoundIoHardwareDeviceDriver.IsSupported) + { + Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration."); - ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SoundIo; - SaveConfig(); + ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SoundIo; + SaveConfig(); - deviceDriver = new SoundIoHardwareDeviceDriver(); + deviceDriver = new SoundIoHardwareDeviceDriver(); + } } else {