See merge request ryubing/ryujinx!202
This commit is contained in:
LotP 2025-10-30 20:55:58 -05:00
parent ab7aeee67b
commit 92b61f9d73
43 changed files with 686 additions and 315 deletions

View file

@ -82,7 +82,7 @@ namespace Ryujinx.Input.SDL2
Features = GetFeaturesFlag();
// Enable motion tracking
if (Features.HasFlag(GamepadFeaturesFlag.Motion))
if ((Features & GamepadFeaturesFlag.Motion) != 0)
{
if (SDL_GameControllerSetSensorEnabled(_gamepadHandle, SDL_SensorType.SDL_SENSOR_ACCEL,
SDL_bool.SDL_TRUE) != 0)
@ -162,7 +162,7 @@ namespace Ryujinx.Input.SDL2
public void Rumble(float lowFrequency, float highFrequency, uint durationMs)
{
if (!Features.HasFlag(GamepadFeaturesFlag.Rumble))
if ((Features & GamepadFeaturesFlag.Rumble) == 0)
return;
ushort lowFrequencyRaw = (ushort)(lowFrequency * ushort.MaxValue);
@ -194,7 +194,7 @@ namespace Ryujinx.Input.SDL2
_ => SDL_SensorType.SDL_SENSOR_INVALID
};
if (!Features.HasFlag(GamepadFeaturesFlag.Motion) || sensorType is SDL_SensorType.SDL_SENSOR_INVALID)
if ((Features & GamepadFeaturesFlag.Motion) == 0 || sensorType is SDL_SensorType.SDL_SENSOR_INVALID)
return Vector3.Zero;
const int ElementCount = 3;