From c4982955b2640a2421288bd09000330a356ff5ec Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Sun, 1 Jan 2023 18:41:55 +0100
Subject: [PATCH] Android: inverse LandscapeLeft and LandscapeRight (see #6959)
LandscapeLeft has now been set to ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE and LandscapeRight to ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE in order to reflect the docs: https://wiki.libsdl.org/SDL2/SDL_HINT_ORIENTATIONS
---
.../app/src/main/java/org/libsdl/app/SDLActivity.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index 2d7d69b76a25..776fb7fa8049 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -971,9 +971,9 @@ public void setOrientationBis(int w, int h, boolean resizable, String hint)
/* If set, hint "explicitly controls which UI orientations are allowed". */
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
- } else if (hint.contains("LandscapeRight")) {
- orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
} else if (hint.contains("LandscapeLeft")) {
+ orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
+ } else if (hint.contains("LandscapeRight")) {
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
}