Revert some changes for testing

This commit is contained in:
_Neo_ 2025-11-26 12:07:32 +02:00
parent cdbe4921e6
commit c00f8aad58
5 changed files with 11 additions and 108 deletions

View file

@ -29,20 +29,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
[ObservableProperty]
public partial Color LedColor { get; set; }
public string RainbowSpeedText
{
get
{
if (RainbowSpeed == 10)
{
return RainbowSpeed.ToString("F1", CultureInfo.CurrentCulture);
}
else
{
return RainbowSpeed.ToString("F2", CultureInfo.CurrentCulture);
}
}
}
public string RainbowSpeedText => RainbowSpeed.ToString("F2", CultureInfo.CurrentCulture);
public float RainbowSpeed
{

View file

@ -1,5 +1,4 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System.Globalization;
namespace Ryujinx.Ava.UI.ViewModels.Input
{
@ -23,36 +22,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
[ObservableProperty]
public partial int Sensitivity { get; set; }
private double _gyroDeadzone;
public double GyroDeadzone
{
get => _gyroDeadzone;
set
{
if (_gyroDeadzone != value)
{
_gyroDeadzone = value;
OnPropertyChanged();
OnPropertyChanged(nameof(GyroDeadzoneText));
}
}
}
public string GyroDeadzoneText
{
get
{
if (_gyroDeadzone == 100)
{
return _gyroDeadzone.ToString("F1", CultureInfo.CurrentCulture);
}
else
{
return _gyroDeadzone.ToString("F2", CultureInfo.CurrentCulture);
}
}
}
[ObservableProperty]
public partial double GyroDeadzone { get; set; }
[ObservableProperty]
public partial bool EnableCemuHookMotion { get; set; }

View file

@ -1,68 +1,13 @@
using System.Globalization;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Ryujinx.Ava.UI.ViewModels.Input
{
public partial class RumbleInputViewModel : BaseModel
{
private float strongRumble;
private float weakRumble;
[ObservableProperty]
public partial float StrongRumble { get; set; }
public float StrongRumble
{
get => strongRumble;
set
{
if (strongRumble != value)
{
strongRumble = value;
OnPropertyChanged();
OnPropertyChanged(nameof(StrongRumbleText));
}
}
}
public float WeakRumble
{
get => weakRumble;
set
{
if (weakRumble != value)
{
weakRumble = value;
OnPropertyChanged();
OnPropertyChanged(nameof(WeakRumbleText));
}
}
}
public string StrongRumbleText
{
get
{
if (StrongRumble == 10)
{
return StrongRumble.ToString("F1", CultureInfo.CurrentCulture);
}
else
{
return StrongRumble.ToString("F2", CultureInfo.CurrentCulture);
}
}
}
public string WeakRumbleText
{
get
{
if (WeakRumble == 10)
{
return WeakRumble.ToString("F1", CultureInfo.CurrentCulture);
}
else
{
return WeakRumble.ToString("F2", CultureInfo.CurrentCulture);
}
}
}
[ObservableProperty]
public partial float WeakRumble { get; set; }
}
}

View file

@ -65,7 +65,7 @@
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="5,0,5,1"
Text="{Binding GyroDeadzoneText}" />
Text="{Binding GyroDeadzone, StringFormat=\{0:0.00\}}" />
</Grid>
<Separator Height="1" Margin="0,0,0,5" />
<CheckBox Margin="0,5,0,5" HorizontalAlignment="Center" IsChecked="{Binding EnableCemuHookMotion}">

View file

@ -30,7 +30,7 @@
Grid.Row="0"
Grid.Column="2"
Margin="5,0,5,1"
Text="{Binding StrongRumbleText}" />
Text="{Binding StrongRumble, StringFormat=\{0:0.00\}}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
@ -50,6 +50,6 @@
Grid.Row="1"
Grid.Column="2"
Margin="5,0,5,1"
Text="{Binding WeakRumbleText}" />
Text="{Binding WeakRumble, StringFormat=\{0:0.00\}}" />
</Grid>
</UserControl>