mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-11 17:26:45 -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
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Avalonia.Threading;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Mesen.Config;
|
|
using Mesen.Utilities;
|
|
using System;
|
|
|
|
namespace Mesen.ViewModels
|
|
{
|
|
public partial class PceInputConfigViewModel : DisposableViewModel
|
|
{
|
|
[ObservableProperty] public partial PcEngineConfig Config { get; set; }
|
|
[ObservableProperty] public partial bool HasTurboTap { get; private set; }
|
|
|
|
public Enum[] AvailableControllerTypesP1 => new Enum[] {
|
|
ControllerType.None,
|
|
ControllerType.PceController,
|
|
ControllerType.PceAvenuePad6,
|
|
ControllerType.PceTurboTap,
|
|
};
|
|
|
|
public Enum[] AvailableControllerTypesTurboTap => new Enum[] {
|
|
ControllerType.None,
|
|
ControllerType.PceController,
|
|
ControllerType.PceAvenuePad6,
|
|
};
|
|
|
|
[Obsolete("For designer only")]
|
|
public PceInputConfigViewModel() : this(new PcEngineConfig()) { }
|
|
|
|
public PceInputConfigViewModel(PcEngineConfig config)
|
|
{
|
|
Config = config;
|
|
|
|
AddDisposable(Config.Port1.ObserveProp(nameof(ControllerConfig.Type), () => {
|
|
HasTurboTap = Config.Port1.Type == ControllerType.PceTurboTap;
|
|
}));
|
|
}
|
|
}
|
|
}
|