Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android get_screen_orientation() not returning valid values #55209

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

madmiraal
Copy link
Contributor

Godot and Android's screen orientation enums don't match one to one. Currently, on Android, the get_screen_orientation() method simply returns the Android enum instead of mapping it to an equivalent Godot one.

This PR maps the Android screen orientation enums to equivalent Godot one's where possible and reports an error if it's not possible.

Fixes #55208

@madmiraal madmiraal requested a review from a team as a code owner November 21, 2021 19:22
@Calinou Calinou added bug cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release platform:android topic:porting labels Nov 21, 2021
@Calinou Calinou added this to the 4.0 milestone Nov 21, 2021
@Calinou Calinou removed cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.4 labels Nov 21, 2021
@m4gr3d m4gr3d merged commit d6f21bf into godotengine:master Nov 22, 2021
@madmiraal madmiraal deleted the fix-android-orientation branch November 22, 2021 09:35
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.

Android get_screen_orientation() returns invalid values
3 participants