mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-11 03:01:50 -10:00
Also fixes DX11.0 support (for Win7 PCs that aren't fully updated), which stopped working after the recent variable refresh rate changes
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using Avalonia.Controls;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Mesen.Config;
|
|
using Mesen.Controls;
|
|
using Mesen.Utilities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace Mesen.ViewModels
|
|
{
|
|
public partial class OtherConsolesConfigViewModel : DisposableViewModel
|
|
{
|
|
[ObservableProperty] public partial CvConfig CvConfig { get; set; }
|
|
[ObservableProperty] public partial CvConfig CvOriginalConfig { get; set; }
|
|
[ObservableProperty] public partial OtherConsolesConfigTab SelectedTab { get; set; } = 0;
|
|
|
|
public CvInputConfigViewModel CvInput { get; private set; }
|
|
|
|
public Enum[] AvailableRegionsCv => new Enum[] {
|
|
ConsoleRegion.Auto,
|
|
ConsoleRegion.Ntsc,
|
|
ConsoleRegion.Pal
|
|
};
|
|
|
|
public OtherConsolesConfigViewModel()
|
|
{
|
|
CvConfig = ConfigManager.Config.Cv;
|
|
CvOriginalConfig = CvConfig.Clone();
|
|
CvInput = new CvInputConfigViewModel(CvConfig);
|
|
|
|
if(Design.IsDesignMode) {
|
|
return;
|
|
}
|
|
|
|
AddDisposable(CvInput);
|
|
AddDisposable(ReactiveHelper.RegisterRecursiveObserver(CvConfig, (s, e) => { CvConfig.ApplyConfig(); }));
|
|
}
|
|
}
|
|
|
|
public enum OtherConsolesConfigTab
|
|
{
|
|
ColecoVision
|
|
}
|
|
}
|