GameMaker-Bugs
GameMaker-Bugs copied to clipboard
display_get_orientation() doesn't work correctly on Android
Description
I'm encountering an issue with screen rotation on Android and the display_get_orientation()
function. When the screen rotates from display_landscape
to display_landscape_flipped
without passing through display_portrait
, the function returns the same value. This prevents me from automatically detecting changes in the notch size.
Example project: display_get_orientation.zip
Expected Change
No response
Steps To Reproduce
- Start GameMaker
- Go to android settings and uncheck:
Allow portrait orientation
andAllow flipped portrait orientation
- Create and object with
show_debug_message(display_get_orientation());
- Run the game on Android device or emulator
- Rotate the screen 180 degrees
- See the issue, the constant of
display_get_orientation()
always returndisplay_landscape
value.
How reliably can you recreate this issue using your steps above?
Always
Which version of GameMaker are you reporting this issue for?
2024.6.2 (Monthly)
Which platform(s) are you seeing the problem on?
Android
Contact Us Package Attached?
- [X] I have attached my Contact Us Package
Sample Project Added?
- [X] I have included a small sample project