mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-11 03:01:50 -10:00
This controller/adapter supports rumble as well as reading the state of both analog sticks and the L/R triggers. Code by @RandalLinden
50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Mesen.Config;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace Mesen.ViewModels
|
|
{
|
|
public partial class SnesInputConfigViewModel : DisposableViewModel
|
|
{
|
|
[ObservableProperty] public partial SnesConfig Config { get; set; }
|
|
|
|
public Enum[] AvailableControllerTypesP1 => new Enum[] {
|
|
ControllerType.None,
|
|
ControllerType.SnesController,
|
|
ControllerType.SnesMouse,
|
|
ControllerType.SuperScope,
|
|
ControllerType.SnesNttDataKeypad,
|
|
ControllerType.Multitap,
|
|
ControllerType.SnesRumbleController,
|
|
ControllerType.SnesBlueRetroController,
|
|
};
|
|
|
|
public Enum[] AvailableControllerTypesP2 => new Enum[] {
|
|
ControllerType.None,
|
|
ControllerType.SnesController,
|
|
ControllerType.SnesMouse,
|
|
ControllerType.SuperScope,
|
|
ControllerType.SnesNttDataKeypad,
|
|
ControllerType.AsciiTurboFileTwinTf2,
|
|
ControllerType.AsciiTurboFileTwinStf,
|
|
ControllerType.Multitap,
|
|
};
|
|
|
|
public Enum[] AvailableControllerTypesMultitap => new Enum[] {
|
|
ControllerType.None,
|
|
ControllerType.SnesController,
|
|
ControllerType.SnesMouse,
|
|
ControllerType.SuperScope,
|
|
};
|
|
|
|
[Obsolete("For designer only")]
|
|
public SnesInputConfigViewModel() : this(new SnesConfig()) { }
|
|
|
|
public SnesInputConfigViewModel(SnesConfig config)
|
|
{
|
|
Config = config;
|
|
}
|
|
}
|
|
}
|