Skip to content

Conversation

@vicocz
Copy link
Owner

@vicocz vicocz commented Jun 10, 2025

No description provided.

@vicocz vicocz added the bug Something isn't working label Jun 10, 2025
@vicocz vicocz added this to the 2025.4 milestone Jun 10, 2025
@vicocz vicocz requested a review from Copilot June 10, 2025 18:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a fallback mechanism for naming gamepad devices by checking the InputDevice.Name and utilizing fallback logic based on input source flags and vendor/product information.

  • Extend event source evaluation to include Dpad inputs
  • Introduce a GetDisplayName method to return a useful fallback name for game controllers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
BrickController2/BrickController2.Android/PlatformServices/GameController/InputEventExtensions.cs Updated IsButtonEventSource and IsAxisEventSource to also recognize Dpad inputs
BrickController2/BrickController2.Android/PlatformServices/GameController/GamepadController.cs Replaced direct device name retrieval with a GetDisplayName method for fallback support
Comments suppressed due to low confidence (1)

BrickController2/BrickController2.Android/PlatformServices/GameController/InputEventExtensions.cs:11

  • Including the Dpad flag here broadens the definition of button events; confirm that subsequent handling of Dpad inputs aligns with this change.
internal static bool IsButtonEventSource(this InputSourceType sourceType) => sourceType.HasFlag(InputSourceType.Gamepad) ||

@vicocz vicocz marked this pull request as ready for review June 10, 2025 18:05
@vicocz vicocz merged commit 90d8a29 into default Jun 10, 2025
3 checks passed
@vicocz vicocz deleted the locals/gamepad-android-noname branch June 10, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant