mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
23 lines
492 B
C#
23 lines
492 B
C#
using Avalonia.Controls;
|
|
using Mesen.Config;
|
|
using Mesen.Utilities;
|
|
using ReactiveUI.Fody.Helpers;
|
|
|
|
namespace Mesen.ViewModels
|
|
{
|
|
public class InputConfigViewModel : DisposableViewModel
|
|
{
|
|
[Reactive] public InputConfig Config { get; set; }
|
|
|
|
public InputConfigViewModel()
|
|
{
|
|
Config = ConfigManager.Config.Input.Clone();
|
|
|
|
if(Design.IsDesignMode) {
|
|
return;
|
|
}
|
|
|
|
AddDisposable(ReactiveHelper.RegisterRecursiveObserver(Config, (s, e) => { Config.ApplyConfig(); }));
|
|
}
|
|
}
|
|
}
|