From 01f66613db74aa223793327910e99440bfb7939a Mon Sep 17 00:00:00 2001 From: dmuratshin Date: Thu, 12 Jan 2017 10:58:35 -0800 Subject: [PATCH] fixed SENSOR_LANDSCAPE and SENSOR_PORTRAIT mode false nativeResume bug --- android-project/src/org/libsdl/app/SDLActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index c3d448437..ec7a5bf1a 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -1169,12 +1169,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, { // 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; }