Make parent models private readonly
This commit is contained in:
parent
368f0b928b
commit
2017bfc37d
2 changed files with 10 additions and 10 deletions
|
@ -54,11 +54,11 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputViewModel parentModel;
|
private readonly InputViewModel _parentModel;
|
||||||
|
|
||||||
public ControllerInputViewModel(InputViewModel model, GamepadInputConfig config)
|
public ControllerInputViewModel(InputViewModel model, GamepadInputConfig config)
|
||||||
{
|
{
|
||||||
parentModel = model;
|
_parentModel = model;
|
||||||
model.NotifyChangesEvent += OnParentModelChanged;
|
model.NotifyChangesEvent += OnParentModelChanged;
|
||||||
OnParentModelChanged();
|
OnParentModelChanged();
|
||||||
Config = config;
|
Config = config;
|
||||||
|
@ -76,9 +76,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
|
|
||||||
public void OnParentModelChanged()
|
public void OnParentModelChanged()
|
||||||
{
|
{
|
||||||
IsLeft = parentModel.IsLeft;
|
IsLeft = _parentModel.IsLeft;
|
||||||
IsRight = parentModel.IsRight;
|
IsRight = _parentModel.IsRight;
|
||||||
Image = parentModel.Image;
|
Image = _parentModel.Image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,11 +53,11 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputViewModel parentModel;
|
private readonly InputViewModel _parentModel;
|
||||||
|
|
||||||
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
||||||
{
|
{
|
||||||
parentModel = model;
|
_parentModel = model;
|
||||||
model.NotifyChangesEvent += OnParentModelChanged;
|
model.NotifyChangesEvent += OnParentModelChanged;
|
||||||
OnParentModelChanged();
|
OnParentModelChanged();
|
||||||
Config = config;
|
Config = config;
|
||||||
|
@ -65,9 +65,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
|
|
||||||
public void OnParentModelChanged()
|
public void OnParentModelChanged()
|
||||||
{
|
{
|
||||||
IsLeft = parentModel.IsLeft;
|
IsLeft = _parentModel.IsLeft;
|
||||||
IsRight = parentModel.IsRight;
|
IsRight = _parentModel.IsRight;
|
||||||
Image = parentModel.Image;
|
Image = _parentModel.Image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue