Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
/SharpDXPublic archive

Commit4113896

Browse files
committed
Update CustomDevice.cs
Hi guys,When a JoystickUpdate comes, the offset included there points to a field in the RawJoystickState struct. Sometimes, it's necessary to find what actual DeviceObjectInstance is related to that update.For that, it would be necessary to clall GetObjectInfo(offset, PropertyHowType.Byoffset), but GetObjectByInfo is internal in your implementation. You already give access to some overloads of it with GetObjectInfoByName, GetObjectInfoById, and GetObjectInfoByUsage, but it lacks the last one: GetObjectInfoByOffset, which is crucial to do that mapping.So, to achieve that, I have added the following method:public DeviceObjectInstance GetObjectInfoByOffset(int offset){return GetObjectInfo(offset, PropertyHowType.Byoffset);}Many thanks in advance, and congrats for your great great work.
1 parent23bfaa5 commit4113896

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎Source/SharpDX.DirectInput/CustomDevice.cs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ public DeviceObjectInstance GetObjectInfoByName(string name)
106106
{
107107
returnGetObjectInfo(GetFromName(name).Offset,PropertyHowType.Byoffset);
108108
}
109+
110+
publicDeviceObjectInstanceGetObjectInfoByOffset(intoffset)
111+
{
112+
returnGetObjectInfo(offset,PropertyHowType.Byoffset);
113+
}
109114

110115
publicObjectPropertiesGetObjectPropertiesByName(stringname)
111116
{
@@ -246,4 +251,4 @@ private void DumpDataFormat(DataFormat format)
246251
}
247252
}
248253
}
249-
}
254+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp