From bb7b8e6ee93a547a0c6e3829e566ad55ca50e6dc Mon Sep 17 00:00:00 2001 From: Lukasz Kozakiewicz Date: Tue, 7 Nov 2017 12:39:21 +0100 Subject: [PATCH] =?UTF-8?q?Projucer:=20=20=20use=20=E2=80=9CuserLandscape?= =?UTF-8?q?=E2=80=9D=20or=20=E2=80=9CsensonLandscape=E2=80=9D=20screen=20o?= =?UTF-8?q?rientation=20for=20Android=20if=20available.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectSaving/jucer_ProjectExport_Android.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index 78d9cdcb28..f791d67080 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -1576,7 +1576,19 @@ private: } } - setAttributeIfNotPresent (*act, "android:screenOrientation", androidScreenOrientation.get()); + if (androidScreenOrientation.get() == "landscape") + { + String landscapeString = androidMinimumSDK.get().getIntValue() < 9 + ? "landscape" + : (androidMinimumSDK.get().getIntValue() < 18 ? "sensorLandscape" : "userLandscape"); + + setAttributeIfNotPresent (*act, "android:screenOrientation", landscapeString); + } + else + { + setAttributeIfNotPresent (*act, "android:screenOrientation", androidScreenOrientation.get()); + } + setAttributeIfNotPresent (*act, "android:launchMode", "singleTask"); auto* intent = getOrCreateChildWithName (*act, "intent-filter");