mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-01 00:52:19 +00:00
Fix issues causing keyboard profiles to throw errors on load. (#1206)
* Fix issues causing keyboard profiles to throw errors on load. * Re-add space before the using aliases
This commit is contained in:
parent
cf1ea4d155
commit
28e12dad0f
1 changed files with 13 additions and 10 deletions
|
@ -1,17 +1,17 @@
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
|
using Ryujinx.Common.Utilities;
|
||||||
|
using Ryujinx.Configuration;
|
||||||
|
using Ryujinx.HLE.FileSystem;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Ryujinx.Configuration;
|
|
||||||
using Ryujinx.Common.Configuration.Hid;
|
|
||||||
using Ryujinx.Common.Utilities;
|
|
||||||
using Ryujinx.HLE.FileSystem;
|
|
||||||
|
|
||||||
using GUI = Gtk.Builder.ObjectAttribute;
|
using GUI = Gtk.Builder.ObjectAttribute;
|
||||||
using Key = Ryujinx.Configuration.Hid.Key;
|
using Key = Ryujinx.Configuration.Hid.Key;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ui
|
namespace Ryujinx.Ui
|
||||||
{
|
{
|
||||||
|
@ -821,20 +821,23 @@ namespace Ryujinx.Ui
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (Stream stream = File.OpenRead(path))
|
|
||||||
{
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
using (Stream stream = File.OpenRead(path))
|
||||||
{
|
{
|
||||||
config = JsonHelper.Deserialize<ControllerConfig>(stream);
|
config = JsonHelper.Deserialize<ControllerConfig>(stream);
|
||||||
}
|
}
|
||||||
catch (ArgumentException)
|
}
|
||||||
|
catch (JsonException)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
using (Stream stream = File.OpenRead(path))
|
||||||
{
|
{
|
||||||
config = JsonHelper.Deserialize<KeyboardConfig>(stream);
|
config = JsonHelper.Deserialize<KeyboardConfig>(stream);
|
||||||
}
|
}
|
||||||
catch { }
|
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue