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