Commit Graph
9 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 6fab39ebb4 iOS: Keep camera frames upright in portrait
The camera delivers frames in the sensor's landscape orientation however
the phone is held, so in portrait the picture was 90 degrees off. Rotate
the capture connection: on iOS 17+ with a rotation coordinator, which
keeps the picture level with the horizon, and before that to match the
interface orientation.

A portrait frame doesn't fit the landscape size the game asks for, so
scale frames to cover it and crop the rest, rather than stretching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:42:25 +02:00
Henrik RydgårdandClaude Opus 5.5 aee93405f5 iOS: Scale camera frames to the requested size instead of cropping
The frame was drawn at its own size into a context of the size the game
asked for, so the game got one corner of the picture. Also drop the
preview layer, which was never shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:28:27 +02:00
Henrik RydgårdandClaude Opus 5.5 2e08b54402 iOS: Move off deprecated APIs
- Request an orientation update with setNeedsUpdateOfSupportedInterfaceOrientations
  on iOS 16+, where attemptRotationToDeviceOrientation is deprecated.
- Open the document picker with UTTypes on iOS 14+, and present it from
  sharedViewController rather than through the deprecated keyWindow.
- List cameras with a discovery session instead of devicesWithMediaType.
- IS_IPAD() instead of UI_USER_INTERFACE_IDIOM().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:28:27 +02:00
Henrik RydgårdandClaude Opus 5 8de3d9b8a0 iOS: Don't fall off the end of checkPermission
The switch covered every AVAuthorizationStatus known today, so an unhandled one
would return garbage from a non-void function. Treat unknown statuses as denied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZk5y4Fzw811WJoNWZb8Sc
2026-08-06 20:56:37 +02:00
Henrik RydgårdandClaude Opus 5 bc2a5c7f3b iOS: Fix per-frame leak in the camera capture path
imageFromSampleBuffer released the input context but not the output one, leaking
a full-size bitmap context for every captured camera frame.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZk5y4Fzw811WJoNWZb8Sc
2026-08-06 20:56:37 +02:00
Henrik Rydgård 538cc62f16 Remove a redundant function 2024-05-22 16:43:18 +02:00
Henrik Rydgård d3955b42bb Rename some system functions, merge the Launch* ones.
android launchurl buildfix
2023-03-21 12:22:59 +01:00
Florin9doi 58b04ef77b QT Api for Camera (Linux/macOS)
Allow the use of different resolutions (win/android/iOS)
2020-02-10 08:47:55 +02:00
Florin9doi 5fbf2d7713 Add camera/location support for iOS
Add front camera support for Android
Allow to change the active camera in-game
2020-01-25 16:54:45 +02:00