Fix Android get_screen_orientation() not returning valid values

This commit is contained in:
Marcel Admiraal
2021-11-21 12:14:29 +00:00
parent dd3acd74bb
commit 05744ee0e2
2 changed files with 30 additions and 2 deletions
+1
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);
}