mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 04:39:11 +00:00
Dispose stuff
This commit is contained in:
parent
86fdd76013
commit
e51c131fd7
5 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
|
@ -182,8 +183,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
return assigner;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnDetachedFromVisualTree(e);
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
|
@ -198,8 +199,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
return assigner;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnDetachedFromVisualTree(e);
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
<views:InputView
|
||||
Grid.Row="0"
|
||||
Name="ControllerSettings" />
|
||||
Name="InputView" />
|
||||
<StackPanel
|
||||
Orientation="Vertical"
|
||||
Grid.Row="2">
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
ControllerSettings.Dispose();
|
||||
InputView.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public void SaveSettings()
|
||||
{
|
||||
InputPage.ControllerSettings?.SaveCurrentProfile();
|
||||
InputPage.InputView?.SaveCurrentProfile();
|
||||
|
||||
if (Owner is MainWindow window && ViewModel.DirectoryChanged)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue