Commit Graph
15 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 61ea2710bd iOS: Lift stuck touches when the scene resigns active
Pulling down Control Center starts a touch on our view that UIKit
doesn't always end or cancel. The tracker kept that slot down forever,
and touch input stopped working until the app was restarted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 12:25:42 +02:00
Henrik RydgårdandClaude Opus 5.5 234917043f iOS: Accept controllers without thumbsticks
- Fixes #22365

Controllers with no sticks, like the 8BitDo FlipPad, don't get an extended
gamepad profile, so InitController ignored them. Fall back to looking up
the same buttons in the physical input profile by name, requiring at least
an A button and a D-pad, and log the element names it found.

Such a pad can have a micro gamepad profile, which InitSiriRemote would
have taken as a remote, so it now skips anything with a B button.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 11:14:30 +02:00
Henrik RydgårdandClaude Opus 5.5 cdf9d38dca iOS: Feed the gyroscope into tilt input
Same as Android: rotation rates go to NativeGyroscope, and SYSPROP_HAS_GYRO shows the "Use gyroscope" option.

Accelerometer data is now scaled from g to m/s^2, like Android's. Tilt normalizes it, but the gyro fusion only trusts the accelerometer when it reads about 9.81, so in g it would never correct drift.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 14:00:33 +02:00
Henrik RydgårdandClaude Opus 5.5 5b05b34b4e tvOS: Fewer ifdefs, capability checks instead
The Siri Remote setup builds on iOS too, the device type comes from the
interface idiom, and requests for things the platform says it lacks are
refused by checking the property. What's left ifdeffed is API tvOS doesn't
have at all. Reports say tvOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:21:14 +02:00
Henrik RydgårdandClaude Opus 5.5 3a8a1799ee Add a tvOS build of the app
Shares the iOS frontend, with camera, location, motion, photo/document
pickers, share sheet, clipboard, microphone, battery and rotation compiled
out. The view controller is a GCEventViewController, so controllers only
reach us through GCController, and the Siri Remote is read as a micro
gamepad and sent as arrow/enter/escape/back keys. tvOS has no persistent
storage besides NSUserDefaults, so the memory stick lives in Caches for now.

Configure with -DIOS_PLATFORM=TVOS. The MoltenVK submodule gets the tvOS
slice from the same stock v1.4.2 release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:06:55 +02:00
Henrik RydgårdandClaude Opus 5.5 cfcf8cc17c iOS: Remove the iCade support
It has done nothing since 2017. iCade input came through iCadeReaderView,
a hidden UIKeyInput view that decoded the controller's keystrokes, and
f0ba66fcd6 ("add support for smart keyboard") commented out the code
that created it. Nothing has made one since, so the view controller's
iCadeEventDelegate methods and the ICadeTracker behind them were never
called.

iCade controllers present themselves to iOS as Bluetooth keyboards, so
their keys still arrive as hardware keyboard presses, which can be
mapped like any other keys. Modern controllers go through
GameController.framework anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:10:37 +02:00
Henrik RydgårdandClaude Opus 5.5 b4775cde07 iOS: Fix the safe area inset and touch scaling
The safe area insets were converted to pixels with UIScreen.scale, but
the display size with nativeScale. The two differ on the Plus models
and the minis, so the insets were off by up to 15% there. Both use the
window scene's nativeScale now.

Touch positions were truncated to integers before being multiplied by
the screen scale, putting them on a grid about 3 dp apart. Convert
straight from points to dp, by the view size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:28:27 +02:00
Henrik Rydgård 584d07ea8e iOS: Implement basic physical keyboard support 2024-06-05 23:27:03 +02:00
Henrik Rydgård 338758f430 iOS: Fix "Home" button on controllers (like the PS logo button on a PS4 controller) 2024-06-05 15:01:02 +02:00
Henrik Rydgård 7b3f0aeab2 iOS: Implement accelerometer support 2024-06-04 11:51:09 +02:00
Henrik Rydgård 98e87a78d8 Extract the iCade code to Controls.mm 2024-05-22 12:11:51 +02:00
Henrik Rydgård bf8d55c970 Finish extracting the touch tracker from the ViewController 2024-05-22 11:59:26 +02:00
Henrik Rydgård 1db11599b4 Move some more code 2024-05-22 11:36:52 +02:00
Henrik Rydgård 82573b4f82 Move controller setup to Controls.mm 2024-05-22 11:18:03 +02:00
Henrik Rydgård 09e89e9d79 Minor cleanup 2024-05-22 10:38:40 +02:00