File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Packages/com.unity.inputsystem Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ however, it has to be formatted properly to pass verification tests.
21
21
- Added the display of the device flag ` CanRunInBackground ` in device debug view.
22
22
- Added analytics for programmatic ` InputAction ` setup via ` InputActionSetupExtensions ` when exiting play-mode.
23
23
24
+ ### Fixed
25
+ - Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260)
26
+
24
27
## [ 1.11.1] - 2024-09-26
25
28
26
29
### Fixed
Original file line number Diff line number Diff line change 6
6
using UnityEngine . InputSystem . LowLevel ;
7
7
using UnityEngine . InputSystem . Utilities ;
8
8
using Unity . Collections . LowLevel . Unsafe ;
9
+ using Unity . Profiling ;
9
10
using UnityEngine . InputSystem . Layouts ;
10
11
using UnityEngine . Scripting ;
11
12
#if UNITY_2021_2_OR_NEWER
@@ -84,6 +85,8 @@ public HIDDeviceDescriptor hidDescriptor
84
85
private bool m_HaveParsedHIDDescriptor ;
85
86
private HIDDeviceDescriptor m_HIDDescriptor ;
86
87
88
+ private static readonly ProfilerMarker k_HIDParseDescriptorFallback = new ProfilerMarker ( "HIDParseDescriptorFallback" ) ;
89
+
87
90
// This is the workhorse for figuring out fallback options for HIDs attached to the system.
88
91
// If the system cannot find a more specific layout for a given HID, this method will try
89
92
// to produce a layout builder on the fly based on the HID descriptor received from
@@ -1130,8 +1133,10 @@ public static HIDDeviceDescriptor FromJson(string json)
1130
1133
}
1131
1134
catch ( Exception )
1132
1135
{
1133
- Debug . LogWarning ( $ "Couldn't parse HID descriptor with fast parser. Using fallback") ;
1134
- return JsonUtility . FromJson < HIDDeviceDescriptor > ( json ) ;
1136
+ k_HIDParseDescriptorFallback . Begin ( ) ;
1137
+ var descriptor = JsonUtility . FromJson < HIDDeviceDescriptor > ( json ) ;
1138
+ k_HIDParseDescriptorFallback . End ( ) ;
1139
+ return descriptor ;
1135
1140
}
1136
1141
#else
1137
1142
return JsonUtility . FromJson < HIDDeviceDescriptor > ( json ) ;
You can’t perform that action at this time.
0 commit comments