Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
This commit is contained in:
parent
1f3a34dd7a
commit
d254548548
42 changed files with 682 additions and 409 deletions
|
@ -1,5 +1,6 @@
|
|||
using ChocolArm64.Memory;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE
|
||||
{
|
||||
|
@ -98,6 +99,11 @@ namespace Ryujinx.HLE
|
|||
*((ulong*)(_ramPtr + position)) = value;
|
||||
}
|
||||
|
||||
public unsafe void WriteStruct<T>(long position, T value)
|
||||
{
|
||||
Marshal.StructureToPtr(value, (IntPtr)(_ramPtr + position), false);
|
||||
}
|
||||
|
||||
public void FillWithZeros(long position, int size)
|
||||
{
|
||||
int size8 = size & ~(8 - 1);
|
||||
|
@ -180,4 +186,4 @@ namespace Ryujinx.HLE
|
|||
MemoryManagement.Free(RamPointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue