Implement vibrations (#2468)
* First working vibration implementation * Fix Infinite Rumble in SDL2Mouse * Stop ignoring one vibValues every 2 * Remove RumbleInfinity as suggested * Reworked all the vibration handle / calculation * Revert HidVibrationDevicePosition changes * Add UI to enable and tune rumble * Remove some stub logs * Add PlayerIndex in rumble debug log * Fix all requested changes * Implements hid::GetVibrationDeviceInfo * Better implements HidVibrationValue.Equals/GetHashCode * Added requested changes from code review * Last fixes from review * Update configuration file version for rebase
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
{
|
||||
public struct HidVibrationDeviceHandle
|
||||
{
|
||||
public byte DeviceType;
|
||||
public byte PlayerId;
|
||||
public byte Position;
|
||||
public byte Reserved;
|
||||
}
|
||||
}
|
@@ -3,6 +3,7 @@
|
||||
public enum HidVibrationDeviceType
|
||||
{
|
||||
None,
|
||||
LinearResonantActuator
|
||||
LinearResonantActuator,
|
||||
GcErm
|
||||
}
|
||||
}
|
@@ -1,4 +1,7 @@
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
using Ryujinx.HLE.HOS.Tamper;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
{
|
||||
public struct HidVibrationValue
|
||||
{
|
||||
@@ -6,5 +9,17 @@
|
||||
public float FrequencyLow;
|
||||
public float AmplitudeHigh;
|
||||
public float FrequencyHigh;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is HidVibrationValue value &&
|
||||
AmplitudeLow == value.AmplitudeLow &&
|
||||
AmplitudeHigh == value.AmplitudeHigh;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(AmplitudeLow, AmplitudeHigh);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user