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