Skip to content

Conversation

@shiena
Copy link
Contributor

@shiena shiena commented May 12, 2025

@shiena shiena requested review from a team as code owners May 12, 2025 13:56
@Chaosus Chaosus added this to the 4.x milestone May 12, 2025
@shiena
Copy link
Contributor Author

shiena commented May 12, 2025

CI errors should be resolved in #104857 .

@shiena
Copy link
Contributor Author

shiena commented May 12, 2025

applied the diff

Diff to apply after merging #104857 .

diff --git a/modules/camera/camera_macos.mm b/modules/camera/camera_macos.mm
--- a/modules/camera/camera_macos.mm	(revision e37d785a0a7f41d37aa42fe3689e86f322c13dc3)
+++ b/modules/camera/camera_macos.mm	(date 1747067891596)
@@ -314,10 +314,14 @@
 	if (@available(macOS 10.15, *)) {
 #endif
 		AVCaptureDeviceDiscoverySession *session;
-		if (@available(macOS 14.0, *)) {
+		if (@available(macOS 14.0, iOS 17.0, *)) {
 			session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternal, AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeContinuityCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
 		} else {
-			session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
+            session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#else
+            session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
+#endif
 		}
 		devices = session.devices;
 #if defined(__x86_64__)

@shiena shiena marked this pull request as draft May 13, 2025 13:59
@shiena shiena force-pushed the feature/support-iso-camera branch 4 times, most recently from b68fa03 to 990f5de Compare May 13, 2025 21:33
@shiena shiena marked this pull request as ready for review May 13, 2025 21:34
@shiena shiena force-pushed the feature/support-iso-camera branch from 990f5de to a1d1102 Compare May 13, 2025 21:34
@shiena shiena requested a review from a team as a code owner May 28, 2025 22:29
@shiena shiena force-pushed the feature/support-iso-camera branch from 73ade2f to 86c594f Compare June 3, 2025 01:17
@shiena shiena force-pushed the feature/support-iso-camera branch 2 times, most recently from 2b908dc to 2a75995 Compare June 4, 2025 18:44
@shiena shiena force-pushed the feature/support-iso-camera branch 5 times, most recently from a4fa196 to 5b4bec4 Compare August 12, 2025 20:34
@shiena shiena force-pushed the feature/support-iso-camera branch from 5b4bec4 to 910729b Compare August 26, 2025 17:46
@fire
Copy link
Member

fire commented Aug 26, 2025

On a brief review I didn't see anything bad, but also probably want to test to see it works.

@shiena
Copy link
Contributor Author

shiena commented Aug 27, 2025

@fire A camera feed demo project is available.
godotengine/godot-demo-projects#1225

@shiena shiena force-pushed the feature/support-iso-camera branch from 910729b to dc74105 Compare September 1, 2025 16:29
@shiena shiena force-pushed the feature/support-iso-camera branch from dc74105 to 5ec1f21 Compare September 16, 2025 11:47
@shiena shiena force-pushed the feature/support-iso-camera branch from 5ec1f21 to e6c4971 Compare September 23, 2025 19:24
@shiena shiena force-pushed the feature/support-iso-camera branch 2 times, most recently from bc2ebe7 to c28134a Compare October 14, 2025 00:57
Co-authored-by: Leo de Penning <[email protected]>
@shiena shiena force-pushed the feature/support-iso-camera branch from c28134a to 9bab6b4 Compare October 24, 2025 19:19
@shiena shiena force-pushed the feature/support-iso-camera branch from 9bab6b4 to 57c0a9e Compare October 24, 2025 19:39
@bruvzg
Copy link
Member

bruvzg commented Oct 24, 2025

Note: Camera code was moved out of the main repo to the godot-ios-plugins, because simply having it in the app (even if it's not used) require camera permission and marking the app as using camera on the AppStore. Which is not desired by majority of Godot project. So unless something about AppStore rules changed, this can't be merged.

@shiena
Copy link
Contributor Author

shiena commented Oct 25, 2025

In that case, I'd like to split the pull request as follows:

  • Move the screen rotation angle notification part from godot_view_controller.mm to the main Godot engine
  • Move the remaining camera preview angle settings from camera_macos.mm to the godot-ios-plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants