diff --git a/scripts/android/files/AndroidManifest.xml b/scripts/android/files/AndroidManifest.xml index bc76e3991..f63c07fa6 100644 --- a/scripts/android/files/AndroidManifest.xml +++ b/scripts/android/files/AndroidManifest.xml @@ -3,6 +3,8 @@ package="tw.DDNet"> + @@ -24,10 +26,11 @@ android:isGame="true" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" - > + android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> + android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" + android:screenOrientation="landscape"> diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index b6b870eb4..ffee9fc48 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -4529,6 +4529,8 @@ int main(int argc, const char **argv) // Trap the Android back button so it can be handled in our code reliably // instead of letting the system handle it. SDL_SetHint("SDL_ANDROID_TRAP_BACK_BUTTON", "1"); + // Force landscape screen orientation. + SDL_SetHint("SDL_IOS_ORIENTATIONS", "LandscapeLeft LandscapeRight"); #endif // init SDL