mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-21 05:13:14 +02:00
Fixed profiles on the input page:
- profiles are unlinked from controllers - sometimes a new profile after saving changed to the previous one, had to select it again (fixed) - when deleting, the profile now resets the name to "default"
This commit is contained in:
parent
9dc36646c1
commit
33e3ba9ff2
2 changed files with 22 additions and 2 deletions
|
@ -106,6 +106,21 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
|
||||
public event Action NotifyChangesEvent;
|
||||
|
||||
public int _profileChoose;
|
||||
public int ProfileChoose
|
||||
{
|
||||
get => _profileChoose;
|
||||
set
|
||||
{
|
||||
if (value >= 0)
|
||||
{
|
||||
_profileChoose = value;
|
||||
}
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerIndex PlayerIdChoose
|
||||
{
|
||||
get => _playerIdChoose;
|
||||
|
@ -821,7 +836,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
|
||||
LoadConfiguration(config);
|
||||
|
||||
LoadDevice();
|
||||
// This line of code hard-links profiles to controllers, the commented line allows profiles to be applied to all controllers
|
||||
// LoadDevice();
|
||||
|
||||
_isLoaded = true;
|
||||
|
||||
|
@ -873,6 +889,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
await File.WriteAllTextAsync(path, jsonString);
|
||||
|
||||
LoadProfiles();
|
||||
|
||||
ProfileChoose = ProfilesList.IndexOf(ProfileName); // Show new profile
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -905,6 +923,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
}
|
||||
|
||||
LoadProfiles();
|
||||
|
||||
ProfileChoose = 0; // Show default profile
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
Name="ProfileBox"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
SelectedIndex="0"
|
||||
SelectedIndex="{Binding ProfileChoose}"
|
||||
ItemsSource="{Binding ProfilesList}"
|
||||
Text="{Binding ProfileName, Mode=TwoWay}" />
|
||||
<Button
|
||||
|
|
Loading…
Add table
Reference in a new issue