mirror of
https://git.ryujinx.app/projects/Ryubing.git
synced 2026-10-22 00:32:16 -05:00
[HLE] Added "null" check for isAtRest (ryubing/ryujinx!287)
See merge request ryubing/ryujinx!287
This commit is contained in:
1 parent
9cae62096a
commit
4e81a4c2f4
1 file changed
+6
-1
@@ -584,8 +584,13 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
|
||||
public bool isAtRest(int playerNumber)
|
||||
{
|
||||
|
||||
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();
|
||||
|
||||
float acceleration = Math.Abs(storage.Acceleration.X)
|
||||
|
||||
Reference in new issue
Block a user