Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 766acaa

Browse files
committed
Slider fix
1 parent 2df311e commit 766acaa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

XOutput/UI/Component/MappingViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public MappingViewModel(GameController controller, XInputTypes inputType)
3737
{
3838
Model.Inputs.Add(directInput);
3939
}
40+
foreach (var directInput in device.Sliders)
41+
{
42+
Model.Inputs.Add(directInput);
43+
}
4044
if (mapperData != null && mapperData.InputType == null)
4145
mapperData.InputType = device.Buttons.FirstOrDefault();
4246
SetSelected(mapperData);

XOutput/UI/View/AutoConfigureViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class AutoConfigureViewModel : ViewModelBase<AutoConfigureModel>
2121
private readonly GameController controller;
2222
private readonly XInputTypes[] valuesToRead;
2323
private XInputTypes xInputType;
24-
private Enum[] inputTypes;
24+
private readonly Enum[] inputTypes;
2525
private DateTime lastTime;
2626

2727
public AutoConfigureViewModel(GameController controller, XInputTypes[] valuesToRead)
@@ -32,7 +32,7 @@ public AutoConfigureViewModel(GameController controller, XInputTypes[] valuesToR
3232
model = new AutoConfigureModel();
3333
Model.ButtonsVisibility = valuesToRead.Length > 1 ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
3434
Model.TimerVisibility = valuesToRead.Length <= 1 ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
35-
inputTypes = controller.InputDevice.Buttons.Concat(controller.InputDevice.Axes).ToArray();
35+
inputTypes = controller.InputDevice.Buttons.Concat(controller.InputDevice.Axes).Concat(controller.InputDevice.Sliders).ToArray();
3636
}
3737

3838
public void Initialize()

0 commit comments

Comments
 (0)