Skip to content

Commit

Permalink
fixed SENSOR_LANDSCAPE and SENSOR_PORTRAIT mode false nativeResume bug
Browse files Browse the repository at this point in the history
  • Loading branch information
frankinshtein committed Jan 12, 2017
1 parent acd7682 commit 01f6661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android-project/src/org/libsdl/app/SDLActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1169,12 +1169,12 @@ public void surfaceChanged(SurfaceHolder holder,
{
// Accept any
}
else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT)
{
if (mWidth > mHeight) {
skip = true;
}
} else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
} else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE) {
if (mWidth < mHeight) {
skip = true;
}
Expand Down

0 comments on commit 01f6661

Please sign in to comment.