Skip to content

Fix reversed analog-stick Y-axis on iOS controllers#512

Open
n-elnouby wants to merge 1 commit into
OpenCloudGaming:kief5555/iosfrom
n-elnouby:patch-1
Open

Fix reversed analog-stick Y-axis on iOS controllers#512
n-elnouby wants to merge 1 commit into
OpenCloudGaming:kief5555/iosfrom
n-elnouby:patch-1

Conversation

@n-elnouby

Copy link
Copy Markdown

The native GameController bridge in StreamerView.payload(for:) forwarded raw thumbstick Y values to the embedded streamer JS. Apple's GameController framework reports Y as up = +1, but the streamer JS (normalizeGamepadAxis(-(axes[1]))) expects the W3C browser convention (up = -1) and negates Y itself — so the value was double-inverted, reversing Y on both sticks.

Negating Y in the Swift bridge converts to the browser convention at the source, so up/down match again. Verified on a device build: both sticks now correct.

Description

The native GameController bridge in StreamerView.payload(for:) forwarded raw
thumbstick Y values to the embedded streamer JS. Apple's GameController
framework reports Y as up = +1, but the streamer JS (normalizeGamepadAxis(-(axes[1])))
expects the W3C browser convention (up = -1) and negates Y itself — so the value
was double-inverted, reversing Y on both sticks.

Negating Y in the Swift bridge converts to the browser convention at the source,
so up/down match again. Verified on a device build: both sticks now correct.
@n-elnouby n-elnouby closed this Jun 12, 2026
@n-elnouby n-elnouby reopened this Jun 12, 2026
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.

1 participant