Skip to content

Add PSVR2-compatible left/right controller detection#10

Open
WolfWings wants to merge 1 commit into
MyroG:mainfrom
WolfWings:patch-1
Open

Add PSVR2-compatible left/right controller detection#10
WolfWings wants to merge 1 commit into
MyroG:mainfrom
WolfWings:patch-1

Conversation

@WolfWings

Copy link
Copy Markdown

Fixes #9

PSVR2 is the most (in)famous example that doesn't name it's controllers Left/Right, but shoehorns it in with (L) and (R) instead.

This tiny patch adds a second set of checks for this alternative left/right naming scheme.

It does not attempt to "optimize" things by caching the toLower call into a variable, as compilers for over 20 years have done common subexpression elimination so simple readable code w/ contextual comments for the new lines seemed preferable for this patch.

Fixes MyroG#9 

PSVR2 is the most (in)famous example that doesn't name it's controllers Left/Right, but shoehorns it in with (R) and (L) instead.

This tiny patch adds a second set of checks for this alternative left/right naming scheme.

It does not attempt to "optimize" things by caching the toLower call into a variable, as compilers for over 20 years have done common subexpression elimination so simple readable code w/ contextual comments for the new lines seemed preferable for this patch.
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.

PlayStation VR2 Sense Controllers incorrectly appear as a single handed controller

1 participant