Skip to content

deliver controller input to the game while emulating - #273

Open
sirfergy wants to merge 1 commit into
OatmealDome:masterfrom
sirfergy:sirfergy/ios-controller-input-in-game
Open

sirfergy wants to merge 1 commit into
OatmealDome:masterfrom
sirfergy:sirfergy/ios-controller-input-in-game

Conversation

@sirfergy

@sirfergy sirfergy commented Jul 30, 2026 •

Copy link
Copy Markdown

A connected controller does nothing during gameplay on recent iOS versions, even though the mapping screen registers every button. Two separate things go wrong, and both have to be fixed for input to reach the emulated pad.

Closes #226

What

  • EmulationViewController derives from GCEventViewController, and the emulation screen sets controllerUserInteractionEnabled = NO. While controller user interaction is on, iOS routes the face buttons (A/B/X/Y) into UIKit menu-focus navigation and they never reach the game. Sticks are unaffected, which is why input looks half-working. This is scoped to the emulation view controller, so controller-driven UI navigation elsewhere in the app is untouched.
  • RefreshDevices() runs when emulation starts. Devices are otherwise only populated at app launch and in the mapping screen, so a controller connected after launch isn't in the ControllerInterface when the game boots. GCPad::GetInput then sees the pad's default device as disconnected and returns before reading any buttons.

Tests

Verified on-device (iPhone, iOS 26) across TestFlight builds: buttons and sticks drive the emulated GameCube pad in-game, and autorotation and the rest of the app's UI behave as before.

Diagnosis was confirmed by reading GCController state directly on the main thread during gameplay: the left stick's axis value updated live while buttonA.isPressed stayed false, which isolates the loss to iOS consuming the face buttons rather than anything in Dolphin's input stack.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sirfergy
sirfergy force-pushed the sirfergy/ios-controller-input-in-game branch from 993545a to 2268e77 Compare July 30, 2026 21:11
@sirfergy
sirfergy marked this pull request as ready for review July 30, 2026 21:18
Copilot AI review requested due to automatic review settings July 30, 2026 21:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Controller does nothing in game

2 participants