mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 11:35:39 +00:00
Merge pull request #288 from zeldin/develop
[X11] Fix XIEventMask to work on any architecture
This commit is contained in:
commit
b82b2c0e8f
|
@ -1811,7 +1811,7 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
public int deviceid; // 0 = XIAllDevices, 1 = XIAllMasterDevices
|
||||
int mask_len;
|
||||
unsafe XIEventMasks* mask;
|
||||
unsafe byte* mask;
|
||||
|
||||
public XIEventMask(int id, XIEventMasks m)
|
||||
{
|
||||
|
@ -1819,8 +1819,9 @@ namespace OpenTK.Platform.X11
|
|||
mask_len = sizeof(XIEventMasks);
|
||||
unsafe
|
||||
{
|
||||
mask = (XIEventMasks*)Marshal.AllocHGlobal(mask_len);
|
||||
*mask = m;
|
||||
mask = (byte*)Marshal.AllocHGlobal(mask_len);
|
||||
for (int i = 0; i < mask_len; i++)
|
||||
mask[i] = (byte)((uint)m >> i*8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue