diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 59ce50923f..28c6ac5863 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -1,4 +1,4 @@ -using DiscordRPC; +using DiscordRPC; using Gtk; using GUI = Gtk.Builder.ObjectAttribute; using Ryujinx.Audio; @@ -208,6 +208,8 @@ namespace Ryujinx.UI } else { + Logger.RestartTime(); + if (Directory.Exists(path)) { string[] romFsFiles = Directory.GetFiles(path, "*.istorage"); @@ -228,7 +230,6 @@ namespace Ryujinx.UI _device.LoadCart(path); } } - else if (File.Exists(path)) { switch (System.IO.Path.GetExtension(path).ToLowerInvariant()) @@ -254,14 +255,14 @@ namespace Ryujinx.UI } catch (ArgumentOutOfRangeException) { - Logger.PrintError(LogClass.Application, $"The file which you have specified is unsupported by Ryujinx"); + Logger.PrintError(LogClass.Application, "The file which you have specified is unsupported by Ryujinx."); } break; } } else { - Logger.PrintWarning(LogClass.Application, "Please specify a valid XCI/NCA/NSP/PFS0/NRO file"); + Logger.PrintWarning(LogClass.Application, "Please specify a valid XCI/NCA/NSP/PFS0/NRO file."); End(); } @@ -396,7 +397,7 @@ namespace Ryujinx.UI Profile.FinishProfiling(); _device.Dispose(); _audioOut.Dispose(); - DiscordClient.Dispose(); + DiscordClient?.Dispose(); Logger.Shutdown(); Environment.Exit(0); }