mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-29 23:56:25 +02:00
Fix: exclude device id when loading preset (independent presets)
fixed bug when selected gamepad disappears if another gamepad was disconnected
This commit is contained in:
parent
299f2144c8
commit
e097ea71ff
1 changed files with 10 additions and 2 deletions
|
@ -465,7 +465,15 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
LoadDevices();
|
LoadDevices();
|
||||||
|
|
||||||
|
if (Config != null)
|
||||||
|
{
|
||||||
|
// Load configuration after disconnection if it is in the configuration file
|
||||||
|
IsModified = true;
|
||||||
|
LoadSavedConfiguration();
|
||||||
|
}
|
||||||
FindPairedDevice();
|
FindPairedDevice();
|
||||||
|
|
||||||
_isChangeTrackingActive = true;
|
_isChangeTrackingActive = true;
|
||||||
return System.Threading.Tasks.Task.CompletedTask;
|
return System.Threading.Tasks.Task.CompletedTask;
|
||||||
});
|
});
|
||||||
|
@ -474,7 +482,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
private async void HandleOnGamepadConnected(string id)
|
private async void HandleOnGamepadConnected(string id)
|
||||||
{
|
{
|
||||||
_isChangeTrackingActive = false;
|
_isChangeTrackingActive = false;
|
||||||
|
|
||||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
LoadDevices();
|
LoadDevices();
|
||||||
|
@ -485,7 +492,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
IsModified = true;
|
IsModified = true;
|
||||||
LoadSavedConfiguration();
|
LoadSavedConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
_isChangeTrackingActive = true;
|
_isChangeTrackingActive = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -847,6 +853,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
{
|
{
|
||||||
_isLoaded = false;
|
_isLoaded = false;
|
||||||
|
|
||||||
|
config.Id = null; // ignore device IDs (there is no longer a need to store device IDs for presets due to their independence from devices)
|
||||||
|
|
||||||
LoadConfiguration(config);
|
LoadConfiguration(config);
|
||||||
|
|
||||||
// This line of code hard-links profiles to controllers, the commented line allows profiles to be applied to all controllers
|
// This line of code hard-links profiles to controllers, the commented line allows profiles to be applied to all controllers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue