Skip to content

Conversation

@shiena
Copy link

@shiena shiena commented Dec 5, 2025

split from godotengine/godot#106305 and merge from godotengine/godot#106777

This PR adds comprehensive Godot 4.x support for the iOS camera module with the following improvements:

  • File separation for version-specific code: Split camera implementation into camera_ios.mm (Godot 3.x) and camera_ios_4x.mm (Godot 4.x) to reduce #if directive complexity
  • Display rotation handling: Added handle_display_rotation_change() support for Godot 4.6+ to properly handle camera feed orientation when device rotates
  • CameraFeed format support: Implemented get_formats() and set_format() for Godot 4.5+ allowing users to query and select camera formats
  • Lazy feed initialization: For Godot 4.5+, camera feeds are now initialized via set_monitoring_feeds() instead of constructor, following the new CameraServer pattern

Version Compatibility

  • Godot 3.x: Uses camera_ios.mm (unchanged behavior)
  • Godot 4.0-4.4: Basic camera functionality
  • Godot 4.5+: CameraFeed format selection support
  • Godot 4.6+: Display rotation change callback support

@shiena
Copy link
Author

shiena commented Dec 6, 2025

This pull request contains changes for the upcoming 4.6 release, so I'll mark it as ready for review once 4.6 is released.

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