From 064bad6ddf898ce915f5bd66af0f6a1edd2ff93a Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Thu, 8 Jun 2023 17:20:13 -0700
Subject: [PATCH] android: EmulationActivity: Fix orientation on Mi Pad 5.

---
 .../java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
index 94d5156cf..f4db61cb3 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
@@ -263,7 +263,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
         val config: Configuration = resources.configuration
 
         if ((config.screenLayout and Configuration.SCREENLAYOUT_LONG_YES) != 0 ||
-            (config.screenLayout and Configuration.SCREENLAYOUT_LONG_NO) == 0) {
+            (config.screenLayout and Configuration.SCREENLAYOUT_LONG_NO) == 0 ||
+            (config.screenLayout and Configuration.SCREENLAYOUT_SIZE_SMALL) != 0) {
             return rotation
         }
         when (rotation) {