Skip to content

Add Sony vendor theme to VendorThemes for automatic PlayStation labeling#82

Merged
lunarcloud merged 2 commits intomainfrom
copilot/add-sony-vendor-theme
Feb 18, 2026
Merged

Add Sony vendor theme to VendorThemes for automatic PlayStation labeling#82
lunarcloud merged 2 commits intomainfrom
copilot/add-sony-vendor-theme

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Describe your changes

Adds Sony (vendor ID 054c) to VendorThemes array alongside existing Nintendo and Microsoft entries. Unrecognized Sony controllers now automatically receive PlayStation button schema.

Changes:

  • Added GameInputSchema.Ragdoll vendor theme for Sony devices in src/gameinput.js
  • Added vendor matching test coverage in src/vendor-theme-matching.test.js

Technical decision: Uses Ragdoll (modern schema with "options"/"share" center buttons) rather than RagdollOld (legacy "start"/"select"). DualShock 4 and DualSense use Ragdoll; DualShock 3 uses RagdollOld but has explicit model entries. Choice documented in code comments.

// Before: Only Nintendo and Microsoft
VendorThemes: [
    new GameInputModel(GameInputSchema.Plumber, 'generic', '057e-0000-Nintendo Device'),
    new GameInputModel(GameInputSchema.Hedgehog, 'xboxone', '045e-0000-Microsoft Device')
]

// After: Sony included
VendorThemes: [
    new GameInputModel(GameInputSchema.Plumber, 'generic', '057e-0000-Nintendo Device'),
    new GameInputModel(GameInputSchema.Hedgehog, 'xboxone', '045e-0000-Microsoft Device'),
    new GameInputModel(GameInputSchema.Ragdoll, 'generic', '054c-0000-Sony Device')
]

Describe your testing

  • All 2154 existing tests pass
  • New test validates vendor ID matching (054c) and schema assignment (Ragdoll)
  • Verified matching across Firefox format (054c-0ce6-Device), Chrome format (Device (Vendor: 054c Product: 0ce6)), and STANDARD GAMEPAD variants
  • Manual verification confirms PlayStation symbols (△ ✕ ◯ □) mapped correctly

Issue ticket number and link

#[Issue number will be linked automatically by the system]

Checklist before requesting a review

  • I have performed a self-review of my code
  • The code passes lint checks.
  • The code has been tested for regressions of existing features.
  • I have considered adding unit tests for any new code.
Original prompt

This section details on the original issue you should resolve

<issue_title>Add Sony vendor theme to VendorThemes for automatic PlayStation labeling</issue_title>
<issue_description>## Problem
Currently VendorThemes includes Nintendo (057e) and Microsoft (045e) but is missing Sony (054c). This means unrecognized PlayStation controllers don't get proper button labels.

Current VendorThemes

// src/gameinput.js - VendorThemes array
static VendorThemes = [
    // Nintendo devices
    new GameInputModel(
        GameInputSchema.Plumber,
        'generic',
        '057e-0000-Nintendo Device'
    ),
    // Microsoft devices
    new GameInputModel(
        GameInputSchema.Hedgehog,
        'generic',
        '045e-0000-Microsoft Device'
    )
    // ❌ Sony is missing!
]

Proposed Addition

static VendorThemes = [
    // Nintendo devices (vendor ID 057e)
    new GameInputModel(
        GameInputSchema.Plumber,
        'generic',
        '057e-0000-Nintendo Device'
    ),
    // Microsoft devices (vendor ID 045e)
    new GameInputModel(
        GameInputSchema.Hedgehog,
        'generic',
        '045e-0000-Microsoft Device'
    ),
    // Sony devices (vendor ID 054c)
    new GameInputModel(
        GameInputSchema.Ragdoll,
        'generic',
        '054c-0000-Sony Device'
    )
]

Benefits

  • DualShock 3, DualShock 4, DualSense controllers automatically get PlayStation symbols (△ ✕ ◯ □)
  • Consistent vendor theme handling across major manufacturers
  • Better out-of-box experience for PlayStation users

Testing

  • Test with DualShock 3 USB/Bluetooth
  • Test with DualShock 4 USB/Bluetooth
  • Test with DualSense USB/Bluetooth
  • Verify vendor ID matching logic in matchesVendor()

Important

We should apply the correct "Ragdoll" vs "RagdollOld" schema. If we cannot properly determine which is appropriate, we should simply document that.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: lunarcloud <1565970+lunarcloud@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Sony vendor theme for PlayStation labeling Add Sony vendor theme to VendorThemes for automatic PlayStation labeling Feb 18, 2026
Copilot AI requested a review from lunarcloud February 18, 2026 01:44
@lunarcloud lunarcloud marked this pull request as ready for review February 18, 2026 02:12
@lunarcloud lunarcloud merged commit 5a7092c into main Feb 18, 2026
1 check passed
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.

Add Sony vendor theme to VendorThemes for automatic PlayStation labeling

2 participants