Skip to content

Add Window::setAllowedOrientations - #111

Merged
Try merged 2 commits into
Try:masterfrom
tryk016:codex/pr-tempest-window-orientation-api
Sep 27, 2026
Merged

Try merged 2 commits into
Try:masterfrom
tryk016:codex/pr-tempest-window-orientation-api

Conversation

@tryk016

@tryk016 tryk016 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Add Window::setAllowedOrientations, as suggested in #106, to control allowed orientations from C++.

On iOS, the app's Info.plist settings still apply. AllOrientations restores the default behavior. Other backends ignore the setting.

Tested on iOS 18 and 27 simulators, including runtime changes and window recreation. iPhoneOS/Simulator Release builds, local macOS tests, and Windows (MSVC/MinGW) and Linux CI pass.

Implement runtime orientation masks on iOS while preserving the app orientation settings. Reevaluate changes on the UIKit stack and restore defaults when a native window is reused. Other backends retain the default no-op.

@Try Try left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Overall LGTM, thanks for PR @tryk016 !
Added only some nitpicks.

Also been considering to add "getter", for orientations permitted by the system, but this might be too ugly to implement on IOS

Comment thread Engine/system/systemapi.h Outdated
Comment thread Engine/system/api/iosapi.mm Outdated
Comment thread Engine/ui/window.h
@tryk016

tryk016 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

Added SystemApi::Orientation, extracted nativeFormat and added operator &.

@Try
Try merged commit 7d3d8b7 into Try:master Sep 27, 2026
4 checks passed
@Try

Try commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Merged, thanks!

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.

2 participants