File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Packages/com.unity.inputsystem/InputSystem/Plugins/HID Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ internal static unsafe HIDDeviceDescriptor ReadHIDDeviceDescriptor(ref InputDevi
257
257
258
258
// Update the descriptor on the device with the information we got.
259
259
deviceDescription . capabilities = hidDeviceDescriptor . ToJson ( ) ;
260
+ Debug . Log ( $ "Parsing HID descriptor from JSON for device '{ deviceDescription . capabilities } '") ;
260
261
}
261
262
else
262
263
{
@@ -385,7 +386,7 @@ public InputControlLayout Build()
385
386
var yElementParameters = yElement . DetermineParameters ( ) ;
386
387
387
388
builder . AddControl ( stickName + "/x" )
388
- . WithFormat ( xElement . isSigned ? InputStateBlock . FormatSBit : InputStateBlock . FormatBit )
389
+ . WithFormat ( xElement . DetermineFormat ( ) )
389
390
. WithByteOffset ( ( uint ) ( xElement . reportOffsetInBits / 8 - byteOffset ) )
390
391
. WithBitOffset ( ( uint ) ( xElement . reportOffsetInBits % 8 ) )
391
392
. WithSizeInBits ( ( uint ) xElement . reportSizeInBits )
@@ -394,7 +395,7 @@ public InputControlLayout Build()
394
395
. WithProcessors ( xElement . DetermineProcessors ( ) ) ;
395
396
396
397
builder . AddControl ( stickName + "/y" )
397
- . WithFormat ( yElement . isSigned ? InputStateBlock . FormatSBit : InputStateBlock . FormatBit )
398
+ . WithFormat ( yElement . DetermineFormat ( ) )
398
399
. WithByteOffset ( ( uint ) ( yElement . reportOffsetInBits / 8 - byteOffset ) )
399
400
. WithBitOffset ( ( uint ) ( yElement . reportOffsetInBits % 8 ) )
400
401
. WithSizeInBits ( ( uint ) yElement . reportSizeInBits )
You can’t perform that action at this time.
0 commit comments