Compare commits
7 Commits
Canary-1.2
...
e75ce17137
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e75ce17137 | ||
|
|
e0ddbe55c0 | ||
|
|
4a4078865f | ||
|
|
3f59bade94 | ||
|
|
0d9a4fe48c | ||
|
|
6c13e94c93 | ||
|
|
3e69afd110 |
@@ -1800,6 +1800,7 @@
|
||||
010005A00B312000,"Megaton Rainfall",gpu;opengl,boots,2022-08-04 18:29:43
|
||||
0100EA100DF92000,"Meiji Katsugeki Haikara Ryuuseigumi - Seibai Shimaseu, Yonaoshi Kagyou",32-bit;nvdec,playable,2022-12-05 13:19:12
|
||||
0100B360068B2000,"Mekorama",gpu,boots,2021-06-17 16:37:21
|
||||
010012301932A000,"Melatonin",,playable,2025-02-16 04:08:17
|
||||
01000FA010340000,"Melbits World",nvdec;online,menus,2021-11-26 13:51:22
|
||||
0100F68019636000,"Melon Journey",,playable,2023-04-23 21:20:01
|
||||
010079C012896000,"Memories Off -Innocent Fille- for Dearest",,playable,2020-08-04 07:31:22
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
[ObservableProperty] private object _configViewModel;
|
||||
[ObservableProperty] private string _profileName;
|
||||
private bool _isLoaded;
|
||||
public bool InitInputPage { get; set; }
|
||||
|
||||
private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||
|
||||
@@ -92,6 +93,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
public bool CanClearLed => SelectedGamepad.Name.ContainsIgnoreCase("DualSense");
|
||||
|
||||
public bool IsModified { get; set; }
|
||||
public bool IsInputConfigChanged { get; set; }
|
||||
|
||||
public event Action NotifyChangesEvent;
|
||||
|
||||
public PlayerIndex PlayerIdChoose
|
||||
@@ -121,13 +124,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
|
||||
}
|
||||
_isLoaded = false;
|
||||
|
||||
LoadConfiguration();
|
||||
LoadDevice();
|
||||
LoadProfiles();
|
||||
|
||||
_isLoaded = true;
|
||||
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
@@ -296,7 +298,10 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
ConfigViewModel = new ControllerInputViewModel(this, new GamepadInputConfig(controllerInputConfig));
|
||||
}
|
||||
}
|
||||
|
||||
IsInputConfigChanged |= InitInputPage; // If the field has been changed, the control settings will be overwritten
|
||||
InitInputPage = true; // initialization variable
|
||||
}
|
||||
|
||||
public void LoadDevice()
|
||||
{
|
||||
@@ -817,6 +822,13 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
IsModified = false;
|
||||
|
||||
if (!IsInputConfigChanged)
|
||||
{
|
||||
return; //If the input settings were not touched, then do nothing
|
||||
}
|
||||
|
||||
IsInputConfigChanged = false; // Input settings have been changed
|
||||
|
||||
List<InputConfig> newConfig = [];
|
||||
|
||||
newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value);
|
||||
|
||||
@@ -65,6 +65,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
if (!float.IsNaN(_changeSlider) && _changeSlider != (float)check.Value)
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
_changeSlider = (float)check.Value;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +78,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
if (sender is CheckBox { IsPointerOver: true })
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
@@ -102,6 +108,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
PointerPressed += MouseClick;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
ControllerInputViewModel viewModel = (DataContext as ControllerInputViewModel);
|
||||
|
||||
IKeyboard keyboard =
|
||||
@@ -208,6 +216,11 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
}
|
||||
}
|
||||
|
||||
private void FlagInputConfigChanged()
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsInputConfigChanged = true;
|
||||
}
|
||||
|
||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||
@@ -239,7 +252,6 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
gamepad?.ClearLed();
|
||||
}
|
||||
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
if (result == UserResult.Yes)
|
||||
{
|
||||
ViewModel.InitInputPage = false;
|
||||
ViewModel.Save();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
PointerPressed += MouseClick;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
if (DataContext is not KeyboardInputViewModel viewModel)
|
||||
return;
|
||||
|
||||
@@ -184,6 +186,11 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
}
|
||||
}
|
||||
|
||||
private void FlagInputConfigChanged()
|
||||
{
|
||||
(DataContext as KeyboardInputViewModel)!.ParentModel.IsInputConfigChanged = true;
|
||||
}
|
||||
|
||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||
|
||||
Reference in New Issue
Block a user