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
257257
258258 // Update the descriptor on the device with the information we got.
259259 deviceDescription . capabilities = hidDeviceDescriptor . ToJson ( ) ;
260+ Debug . Log ( $ "Parsing HID descriptor from JSON for device '{ deviceDescription . capabilities } '") ;
260261 }
261262 else
262263 {
@@ -385,7 +386,7 @@ public InputControlLayout Build()
385386 var yElementParameters = yElement . DetermineParameters ( ) ;
386387
387388 builder . AddControl ( stickName + "/x" )
388- . WithFormat ( xElement . isSigned ? InputStateBlock . FormatSBit : InputStateBlock . FormatBit )
389+ . WithFormat ( xElement . DetermineFormat ( ) )
389390 . WithByteOffset ( ( uint ) ( xElement . reportOffsetInBits / 8 - byteOffset ) )
390391 . WithBitOffset ( ( uint ) ( xElement . reportOffsetInBits % 8 ) )
391392 . WithSizeInBits ( ( uint ) xElement . reportSizeInBits )
@@ -394,7 +395,7 @@ public InputControlLayout Build()
394395 . WithProcessors ( xElement . DetermineProcessors ( ) ) ;
395396
396397 builder . AddControl ( stickName + "/y" )
397- . WithFormat ( yElement . isSigned ? InputStateBlock . FormatSBit : InputStateBlock . FormatBit )
398+ . WithFormat ( yElement . DetermineFormat ( ) )
398399 . WithByteOffset ( ( uint ) ( yElement . reportOffsetInBits / 8 - byteOffset ) )
399400 . WithBitOffset ( ( uint ) ( yElement . reportOffsetInBits % 8 ) )
400401 . WithSizeInBits ( ( uint ) yElement . reportSizeInBits )
You can’t perform that action at this time.
0 commit comments