mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-27 14:49:05 +00:00
[HID] Fixed HD Rumble latency (#104)
Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/104
This commit is contained in:
@@ -221,6 +221,7 @@ namespace Ryujinx.Headless
|
||||
StrongRumble = 1f,
|
||||
WeakRumble = 1f,
|
||||
EnableRumble = false,
|
||||
UseHDRumble = true
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Services.Hid;
|
||||
using Ryujinx.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -149,9 +150,20 @@ namespace Ryujinx.Ava.Input
|
||||
Logger.Info?.Print(LogClass.UI, "SetLed called on an AvaloniaKeyboard");
|
||||
}
|
||||
|
||||
public void SetTriggerThreshold(float triggerThreshold) { }
|
||||
public void SetTriggerThreshold(float triggerThreshold)
|
||||
{
|
||||
// No operations
|
||||
}
|
||||
|
||||
public void Rumble(float lowFrequency, float highFrequency, uint durationMs) { }
|
||||
public bool HDRumble(VibrationValue left, VibrationValue right)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Rumble(float lowFrequency, float highFrequency, uint durationMs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Vector3 GetMotionData(MotionInputId inputId) => Vector3.Zero;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Services.Hid;
|
||||
using Ryujinx.Input;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
@@ -64,8 +65,13 @@ namespace Ryujinx.Ava.Input
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HDRumble(VibrationValue left, VibrationValue right)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
|
||||
public bool Rumble(float lowFrequency, float highFrequency, uint durationMs)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||
/// <summary>
|
||||
/// The current version of the file format
|
||||
/// </summary>
|
||||
public const int CurrentVersion = 72;
|
||||
public const int CurrentVersion = 73;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the configuration file format
|
||||
|
||||
@@ -333,6 +333,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||
EnableRumble = false,
|
||||
StrongRumble = 1f,
|
||||
WeakRumble = 1f,
|
||||
UseHDRumble = true
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
|
||||
public float WeakRumble { get; set; }
|
||||
public float StrongRumble { get; set; }
|
||||
public bool UseHDRumble { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
@@ -236,6 +237,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
EnableRumble = controllerInput.Rumble.EnableRumble;
|
||||
WeakRumble = controllerInput.Rumble.WeakRumble;
|
||||
StrongRumble = controllerInput.Rumble.StrongRumble;
|
||||
UseHDRumble = controllerInput.Rumble.UseHDRumble;
|
||||
}
|
||||
|
||||
if (controllerInput.Led != null)
|
||||
@@ -307,6 +309,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
EnableRumble = EnableRumble,
|
||||
WeakRumble = WeakRumble,
|
||||
StrongRumble = StrongRumble,
|
||||
UseHDRumble = UseHDRumble,
|
||||
},
|
||||
Led = new LedConfigController
|
||||
{
|
||||
|
||||
@@ -789,6 +789,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
StrongRumble = 1f,
|
||||
WeakRumble = 1f,
|
||||
EnableRumble = false,
|
||||
UseHDRumble = true
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,5 +9,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
|
||||
[ObservableProperty]
|
||||
public partial float WeakRumble { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool EnableHDRumble { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,15 @@
|
||||
Margin="5,0"
|
||||
Text="{Binding WeakRumble, StringFormat=\{0:0.00\}}" />
|
||||
</StackPanel>
|
||||
<CheckBox
|
||||
Margin="5"
|
||||
IsChecked="{Binding EnableHDRumble}">
|
||||
<TextBlock
|
||||
Margin="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{ext:Locale ControllerSettingsRumbleUseHDRumble}"
|
||||
ToolTip.Tip="{ext:Locale HDRumbleTooltip}" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
StrongRumble = config.StrongRumble,
|
||||
WeakRumble = config.WeakRumble,
|
||||
EnableHDRumble = config.UseHDRumble
|
||||
};
|
||||
|
||||
InitializeComponent();
|
||||
@@ -45,6 +46,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
GamepadInputConfig config = viewModel.Config;
|
||||
config.StrongRumble = content.ViewModel.StrongRumble;
|
||||
config.WeakRumble = content.ViewModel.WeakRumble;
|
||||
config.UseHDRumble = content.ViewModel.EnableHDRumble;
|
||||
};
|
||||
|
||||
await contentDialog.ShowAsync();
|
||||
|
||||
Reference in New Issue
Block a user