GameMaker-Bugs icon indicating copy to clipboard operation
GameMaker-Bugs copied to clipboard

display_get_orientation() doesn't work correctly on Android

Open SantiFerre opened this issue 6 months ago • 0 comments

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

  1. Start GameMaker
  2. Go to android settings and uncheck: Allow portrait orientation and Allow flipped portrait orientation
  3. Create and object with show_debug_message(display_get_orientation());
  4. Run the game on Android device or emulator
  5. Rotate the screen 180 degrees
  6. See the issue, the constant of display_get_orientation() always return display_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

SantiFerre avatar Aug 16 '24 18:08 SantiFerre