gamepad: Remove DCHECK_EQ for XInput in GamepadPlatformDataFetcherMac [chromium/src : main]

0 views
Skip to first unread message

Rob Pitkin (Gerrit)

unread,
Jan 14, 2026, 1:54:27 PM (yesterday) Jan 14
to Matt Reynolds, Alvin Ji, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
Attention needed from Alvin Ji and Matt Reynolds

Rob Pitkin added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Rob Pitkin . resolved

Matt and I discussed removing this DCHECK_EQ and replacing it with a log in our 1:1 yesterday. PTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Alvin Ji
  • Matt Reynolds
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I346fb98f0d4ff10c8e522ab2d0f69b53f5a45886
Gerrit-Change-Number: 7467576
Gerrit-PatchSet: 1
Gerrit-Owner: Rob Pitkin <robp...@chromium.org>
Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
Gerrit-Reviewer: Rob Pitkin <robp...@chromium.org>
Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
Gerrit-Attention: Alvin Ji <alv...@chromium.org>
Gerrit-Comment-Date: Wed, 14 Jan 2026 18:54:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Matt Reynolds (Gerrit)

unread,
Jan 14, 2026, 4:21:08 PM (yesterday) Jan 14
to Rob Pitkin, Alvin Ji, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
Attention needed from Alvin Ji and Rob Pitkin

Matt Reynolds added 1 comment

Line 174, Patchset 1 (Latest): DVLOG(1) << "XInput gamepad claimed by GamepadPlatformDataFetcherMac";
Matt Reynolds . unresolved

nit: Make this VLOG so we can enable the log message in release builds

Open in Gerrit

Related details

Attention is currently required from:
  • Alvin Ji
  • Rob Pitkin
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I346fb98f0d4ff10c8e522ab2d0f69b53f5a45886
    Gerrit-Change-Number: 7467576
    Gerrit-PatchSet: 1
    Gerrit-Owner: Rob Pitkin <robp...@chromium.org>
    Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
    Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Reviewer: Rob Pitkin <robp...@chromium.org>
    Gerrit-Attention: Rob Pitkin <robp...@chromium.org>
    Gerrit-Attention: Alvin Ji <alv...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 21:20:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rob Pitkin (Gerrit)

    unread,
    Jan 14, 2026, 4:29:35 PM (yesterday) Jan 14
    to Matt Reynolds, Alvin Ji, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
    Attention needed from Alvin Ji and Matt Reynolds

    Rob Pitkin added 2 comments

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Rob Pitkin . resolved

    Thanks for the review! PTAL

    Line 174, Patchset 1: DVLOG(1) << "XInput gamepad claimed by GamepadPlatformDataFetcherMac";
    Matt Reynolds . resolved

    nit: Make this VLOG so we can enable the log message in release builds

    Rob Pitkin

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alvin Ji
    • Matt Reynolds
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I346fb98f0d4ff10c8e522ab2d0f69b53f5a45886
      Gerrit-Change-Number: 7467576
      Gerrit-PatchSet: 2
      Gerrit-Owner: Rob Pitkin <robp...@chromium.org>
      Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
      Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Reviewer: Rob Pitkin <robp...@chromium.org>
      Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Attention: Alvin Ji <alv...@chromium.org>
      Gerrit-Comment-Date: Wed, 14 Jan 2026 21:29:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Matt Reynolds <mattre...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alvin Ji (Gerrit)

      unread,
      Jan 14, 2026, 5:58:22 PM (yesterday) Jan 14
      to Rob Pitkin, Matt Reynolds, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
      Attention needed from Matt Reynolds and Rob Pitkin

      Alvin Ji added 1 comment

      Commit Message
      Line 9, Patchset 2 (Latest):Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
      instead of XboxDataFetcher due to macOS creating a virtual HID for the
      Alvin Ji . unresolved

      I wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Matt Reynolds
      • Rob Pitkin
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I346fb98f0d4ff10c8e522ab2d0f69b53f5a45886
        Gerrit-Change-Number: 7467576
        Gerrit-PatchSet: 2
        Gerrit-Owner: Rob Pitkin <robp...@chromium.org>
        Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Reviewer: Rob Pitkin <robp...@chromium.org>
        Gerrit-Attention: Rob Pitkin <robp...@chromium.org>
        Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Comment-Date: Wed, 14 Jan 2026 22:58:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Matt Reynolds (Gerrit)

        unread,
        Jan 14, 2026, 7:25:34 PM (yesterday) Jan 14
        to Rob Pitkin, Alvin Ji, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
        Attention needed from Rob Pitkin

        Matt Reynolds added 1 comment

        Commit Message
        Line 9, Patchset 2 (Latest):Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
        instead of XboxDataFetcher due to macOS creating a virtual HID for the
        Alvin Ji . unresolved

        I wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?

        Matt Reynolds

        On older macOS XInput gamepads will still be enumerated by XboxDataFetcher but on newer macOS XboxDataFetcher can't claim the USB interface because it's claimed by macOS. Newer macOS also creates a virtual HID gamepad representing the XInput gamepad, this virtual HID is the device seen by GamepadPlatformDataFetcherMac.

        The DCHECK was originally added to make sure we weren't double-counting XInput devices in RecordConnectedGamepad which is called from both data fetchers. The DCHECK doesn't actually guard against double-counting, it's just a sanity check, so removing it shouldn't have any adverse effect.

        I asked Rob to remove the DCHECK because on newer macOS it causes an unnecessary DCHECK failure whenever an XInput gamepad is connected.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Rob Pitkin
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I346fb98f0d4ff10c8e522ab2d0f69b53f5a45886
        Gerrit-Change-Number: 7467576
        Gerrit-PatchSet: 2
        Gerrit-Owner: Rob Pitkin <robp...@chromium.org>
        Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Reviewer: Rob Pitkin <robp...@chromium.org>
        Gerrit-Attention: Rob Pitkin <robp...@chromium.org>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 00:25:22 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Alvin Ji <alv...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alvin Ji (Gerrit)

        unread,
        6:25 PM (2 hours ago) 6:25 PM
        to Rob Pitkin, Matt Reynolds, Chromium LUCI CQ, chromium...@chromium.org, mac-r...@chromium.org, mattreyno...@chromium.org
        Attention needed from Rob Pitkin

        Alvin Ji added 1 comment

        Commit Message
        Line 9, Patchset 2 (Latest):Gamepads are now being enumerated by GamepadPlatformDataFetcherMac
        instead of XboxDataFetcher due to macOS creating a virtual HID for the
        Alvin Ji . unresolved

        I wonder does this actually mean Xinput gamepads used to be enumerated by XboxDataFetecher but now are enumerated by GamepadPlatformDataFetcherMac instead. So it is now safe to remove the DCHECK_EQ and replace it with just a logging message for XInput gamepads?

        Matt Reynolds

        On older macOS XInput gamepads will still be enumerated by XboxDataFetcher but on newer macOS XboxDataFetcher can't claim the USB interface because it's claimed by macOS. Newer macOS also creates a virtual HID gamepad representing the XInput gamepad, this virtual HID is the device seen by GamepadPlatformDataFetcherMac.

        The DCHECK was originally added to make sure we weren't double-counting XInput devices in RecordConnectedGamepad which is called from both data fetchers. The DCHECK doesn't actually guard against double-counting, it's just a sanity check, so removing it shouldn't have any adverse effect.

        I asked Rob to remove the DCHECK because on newer macOS it causes an unnecessary DCHECK failure whenever an XInput gamepad is connected.

        Alvin Ji

        Thanks, in that case I wonder how would we address double enumeration case the original DCHECK wish to prevent. Wouldn't remove the DCHECK now reveal the original issue where the same controller can be duplicate in chooser? Should we log the message and return early?

        Gerrit-Comment-Date: Thu, 15 Jan 2026 23:25:19 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Matt Reynolds <mattre...@chromium.org>
        Comment-In-Reply-To: Alvin Ji <alv...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages