diff -r 26a817fe1b07 android-project/app/src/main/java/org/libsdl/app/SDLActivity.java --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java Sun Sep 02 23:57:06 2018 +0300 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java Mon Sep 03 14:21:30 2018 -0600 @@ -702,8 +702,13 @@ public void setOrientationBis(int w, int h, boolean resizable, String hint) { int orientation = -1; + boolean set_unspecified = false; // SCREEN_ORIENTATION_UNSPECIFIED is -1 also - if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) { + if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft") && + hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) { + orientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; + set_unspecified = true; + } else if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) { orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; } else if (hint.contains("LandscapeRight")) { orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; @@ -718,7 +723,7 @@ } /* no valid hint */ - if (orientation == -1) { + if (orientation == -1 && !set_unspecified) { if (resizable) { /* no fixed orientation */ } else {