mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-02 11:15:29 +00:00
[HLE] Added "null" check for isAtRest (ryubing/ryujinx!287)
Some checks failed
Canary CI / Release for linux-arm64 (push) Has been cancelled
Canary CI / Release for linux-x64 (push) Has been cancelled
Canary CI / Release for win-x64 (push) Has been cancelled
Canary CI / Release MacOS universal (push) Has been cancelled
Canary CI / Create GitLab Release (push) Has been cancelled
Some checks failed
Canary CI / Release for linux-arm64 (push) Has been cancelled
Canary CI / Release for linux-x64 (push) Has been cancelled
Canary CI / Release for win-x64 (push) Has been cancelled
Canary CI / Release MacOS universal (push) Has been cancelled
Canary CI / Create GitLab Release (push) Has been cancelled
See merge request ryubing/ryujinx!287
This commit is contained in:
parent
9cae62096a
commit
4e81a4c2f4
1 changed files with 6 additions and 1 deletions
|
|
@ -584,8 +584,13 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
public bool isAtRest(int playerNumber)
|
public bool isAtRest(int playerNumber)
|
||||||
{
|
{
|
||||||
|
|
||||||
ref NpadInternalState currentNpad = ref _device.Hid.SharedMemory.Npads[playerNumber].InternalState;
|
ref NpadInternalState currentNpad = ref _device.Hid.SharedMemory.Npads[playerNumber].InternalState;
|
||||||
|
|
||||||
|
if (currentNpad.StyleSet == NpadStyleTag.None)
|
||||||
|
{
|
||||||
|
return true; // it will always be at rest because it cannot move.
|
||||||
|
}
|
||||||
|
|
||||||
ref SixAxisSensorState storage = ref GetSixAxisSensorLifo(ref currentNpad, false).GetCurrentEntryRef();
|
ref SixAxisSensorState storage = ref GetSixAxisSensorLifo(ref currentNpad, false).GetCurrentEntryRef();
|
||||||
|
|
||||||
float acceleration = Math.Abs(storage.Acceleration.X)
|
float acceleration = Math.Abs(storage.Acceleration.X)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue