Skip to content

CHANGE: Remove 32-bit compilation check for HID on Windows players#2403

Open
jfreire-unity wants to merge 1 commit intodevelopfrom
remove-32-bit-compilation-check
Open

CHANGE: Remove 32-bit compilation check for HID on Windows players#2403
jfreire-unity wants to merge 1 commit intodevelopfrom
remove-32-bit-compilation-check

Conversation

@jfreire-unity
Copy link
Copy Markdown
Collaborator

@jfreire-unity jfreire-unity commented Apr 2, 2026

Description

This removes a compilation check for Windows 32-bit players regarding HID not being supported.
I built with a Windows 32-bit player with U6.x version and the warning was not raised when building so I assume it's not doing anything anymore.

I found this issue when moving this code to trunk becase UNITY_64 is not available at the point the modules are compiled.
I was also told this might be a old legacy check so let's see what QA does.

If this works, we can close https://jira.unity3d.com/browse/ISX-2543

Testing status & QA

I only tested building a sample on Windows 11 but selecting Windows 32-bit architecture on "Build Profile" settings view.

Test plan

We should test HID devices such as Dualsense, Dualshock, Xbox and potentially Nintendo Switch Pro controller work fine for Windows 32-bit standalone players.

OS versions to be tested:

  • Windows 11 with either 2022.3 and U6 builds.
  • Minimum Windows 32-bit supported version on 2022.3
  • Minimum Windows 32-bit supported version on U6

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity:
  • Halo Effect:

Comments to reviewers

We should test HID devices such as Dualsense, Dualshock, Xbox and potentially Nintendo Switch Pro controller work fine for Windows 32-bit standalone players.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@jfreire-unity jfreire-unity requested a review from Pauliusd01 April 2, 2026 10:59
Copy link
Copy Markdown
Contributor

@u-pr u-pr bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great
The review identified a potential issue regarding the removal of a platform-specific support warning. Please verify if the x86 Windows HID support is now fully implemented or if the warning should remain.

🤖 Helpful? 👍/👎

@@ -11,11 +11,6 @@
using UnityEngine.Scripting;
using UnityEngine.Pool;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium
The #warning regarding the lack of HID support for 32-bit Windows standalone players has been removed. Could you confirm if this platform is now fully supported? If the limitation still exists, removing this diagnostic warning without an alternative notice might lead to difficult-to-debug issues for users targeting x86 Windows.

🤖 Helpful? 👍/👎

@jfreire-unity
Copy link
Copy Markdown
Collaborator Author

Added something more to QA section of PR description

@codecov-github-com
Copy link
Copy Markdown

codecov-github-com bot commented Apr 2, 2026

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2403      +/-   ##
===========================================
+ Coverage    77.92%   78.11%   +0.19%     
===========================================
  Files          482      483       +1     
  Lines        97755    98784    +1029     
===========================================
+ Hits         76175    77170     +995     
- Misses       21580    21614      +34     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.34% <ø> (-0.22%) ⬇️
inputsystem_MacOS_2022.3_project 75.32% <ø> (-0.05%) ⬇️
inputsystem_MacOS_6000.0 5.31% <ø> (-0.03%) ⬇️
inputsystem_MacOS_6000.0_project 77.21% <ø> (-0.06%) ⬇️
inputsystem_MacOS_6000.3 5.31% <ø> (-0.03%) ⬇️
inputsystem_MacOS_6000.3_project 77.21% <ø> (-0.06%) ⬇️
inputsystem_MacOS_6000.4 5.31% <ø> (-0.03%) ⬇️
inputsystem_MacOS_6000.4_project 77.22% <ø> (-0.06%) ⬇️
inputsystem_MacOS_6000.5 5.30% <ø> (-0.04%) ⬇️
inputsystem_MacOS_6000.5_project 77.26% <ø> (-0.02%) ⬇️
inputsystem_MacOS_6000.6 5.30% <ø> (-0.04%) ⬇️
inputsystem_MacOS_6000.6_project 77.26% <ø> (-0.02%) ⬇️
inputsystem_Ubuntu_2022.3_project 75.22% <ø> (+0.05%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <ø> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.0_project 77.12% <ø> (+0.05%) ⬆️
inputsystem_Ubuntu_6000.3 5.31% <ø> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.3_project 77.12% <ø> (+0.04%) ⬆️
inputsystem_Ubuntu_6000.4 5.32% <ø> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.4_project 77.13% <ø> (+0.04%) ⬆️
inputsystem_Ubuntu_6000.5 5.31% <ø> (-0.04%) ⬇️
inputsystem_Ubuntu_6000.5_project 77.16% <ø> (+0.07%) ⬆️
inputsystem_Ubuntu_6000.6 5.31% <ø> (-0.04%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.16% <ø> (+0.08%) ⬆️
inputsystem_Windows_2022.3 5.34% <ø> (-0.22%) ⬇️
inputsystem_Windows_2022.3_project 75.44% <ø> (-0.05%) ⬇️
inputsystem_Windows_6000.0 5.31% <ø> (-0.03%) ⬇️
inputsystem_Windows_6000.0_project 77.34% <ø> (-0.05%) ⬇️
inputsystem_Windows_6000.3 5.31% <ø> (-0.03%) ⬇️
inputsystem_Windows_6000.3_project 77.34% <ø> (-0.06%) ⬇️
inputsystem_Windows_6000.4 5.31% <ø> (-0.03%) ⬇️
inputsystem_Windows_6000.4_project 77.34% <ø> (-0.05%) ⬇️
inputsystem_Windows_6000.5 5.30% <ø> (-0.04%) ⬇️
inputsystem_Windows_6000.5_project 77.39% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.6 5.30% <ø> (-0.04%) ⬇️
inputsystem_Windows_6000.6_project 77.39% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...m.unity.inputsystem/InputSystem/Plugins/HID/HID.cs 69.98% <ø> (ø)

... and 7 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@Pauliusd01
Copy link
Copy Markdown
Collaborator

/test_plan

@u-pr
Copy link
Copy Markdown
Contributor

u-pr bot commented Apr 8, 2026

Test Plan

  • Test plan approved by PR author
  • Test execution in progress
  • Test execution complete
  • Ready for merge

Summary of Changes & Risk Assessment

Summary of Changes

This PR removes a legacy compilation check and warning in HID.cs:L15-L19 that flagged HID support as broken for 32-bit Windows standalone players. The check is being removed because UNITY_64 is not consistently available during module compilation and the restriction is believed to be obsolete.

Risk Assessment

  • High Risk Areas: None identified.
  • Medium Risk Areas: HID device functionality on 32-bit Windows (ensuring the "unsupported" claim was indeed legacy and not a current technical limitation).
  • Low Risk Areas: Windows 64-bit stability, Editor HID handling.

Test Scenarios

Functional Testing

  • 32-bit Build Verification: Create a Standalone Windows build using the x86 (32-bit) architecture. Verify that no compilation warnings regarding HID support appear in the console.
  • Controller Input (Windows 32-bit): In a 32-bit standalone player, verify the following HID devices are correctly recognized and provide input:
    • DualSense (PS5)
    • DualShock 4 (PS4)
    • Nintendo Switch Pro Controller
  • Xbox Controller (HID mode): Verify Xbox controllers function correctly when connected via Bluetooth (which often uses HID paths) on a 32-bit build.

Regression Testing

  • Windows 64-bit Parity: Verify that HID devices continue to function normally in 64-bit standalone players on Windows 10/11.
  • Multi-version Validation: Perform the 32-bit build test on both 2022.3 LTS and Unity 6 (U6) to ensure the removal of the preprocessor check doesn't surface issues in older stable streams.
🔍 Regression Deep Dive (additional risks identified)
  • OS Compatibility: Test the 32-bit build on the minimum supported Windows version for the respective Unity version (e.g., Windows 10) to ensure the HID driver stack behaves consistently with the 32-bit player.

Edge Cases

  • Hot-plugging: Connect and disconnect HID controllers while a 32-bit standalone player is running to ensure the device discovery logic remains stable.

💡 This test plan updates automatically when /test_plan is run on new commits. If you have any feedback, please reach out in #ai-qa


🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr

@jfreire-unity jfreire-unity requested review from K-Tone and ekcoh April 8, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants