1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Fix Android get_screen_orientation() not returning valid values

This commit is contained in:
Marcel Admiraal
2021-11-21 11:37:09 +00:00
parent dd3acd74bb
commit 05744ee0e2
2 changed files with 30 additions and 2 deletions

View File

@@ -469,6 +469,7 @@ void OS_Android::set_screen_orientation(ScreenOrientation p_orientation) {
OS::ScreenOrientation OS_Android::get_screen_orientation() const {
const int orientation = godot_io_java->get_screen_orientation();
ERR_FAIL_INDEX_V_MSG(orientation, 7, OS::ScreenOrientation(0), "Unrecognized screen orientation.");
return OS::ScreenOrientation(orientation);
}