From 93e9bc4e51a9ee8800d050fc350e1455e8b736ae Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Tue, 9 Mar 2021 10:10:11 +0300 Subject: [PATCH] restrict both apps to 64-bit iPad with multitasking and Metal --- Info.plist | 14 +++++--------- client/CMT.cpp | 12 ++---------- configure_ios.sh | 2 +- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Info.plist b/Info.plist index 14c1b198d..fd7ef47e7 100644 --- a/Info.plist +++ b/Info.plist @@ -43,19 +43,14 @@ DTXcodeBuild 11E801a MinimumOSVersion - 9.0 + 11.0 NSAppTransportSecurity NSAllowsArbitraryLoads - UIBackgroundModes - - audio - UIDeviceFamily - 1 2 UIFileSharingEnabled @@ -64,14 +59,15 @@ LaunchScreen UIRequiredDeviceCapabilities - armv7 + arm64 + metal - UIRequiresFullScreen - UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown UIUserInterfaceStyle Light diff --git a/client/CMT.cpp b/client/CMT.cpp index a2aa4c467..cdd1408de 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -1128,16 +1128,8 @@ static bool recreateWindow(int w, int h, int bpp, bool fullscreen, int displayIn logGlobal->error("Can't fix aspect ratio for screen"); } #elif defined(VCMI_IOS) - auto createWindow = [displayIndex](Uint32 extraFlags = 0) { - mainWindow = SDL_CreateWindow(NAME.c_str(), SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex), SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex), 0, 0, SDL_WINDOW_FULLSCREEN/*_DESKTOP*/ | SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALLOW_HIGHDPI | extraFlags); - return mainWindow != nullptr; - }; - if (!createWindow(SDL_WINDOW_METAL)) - { - logGlobal->warn("Metal unavailable, using OpenGL ES"); - createWindow(); - } -// SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight"); // TODO: isn't setting in Info.plist not enough? + mainWindow = SDL_CreateWindow(NAME.c_str(), SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex), SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex), 0, 0, SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_METAL); + SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight"); SDL_SetHint(SDL_HINT_IOS_HIDE_HOME_INDICATOR, "1"); SDL_SetHint(SDL_HINT_RETURN_KEY_HIDES_IME, "1"); diff --git a/configure_ios.sh b/configure_ios.sh index 1a0bc58ae..93153f630 100755 --- a/configure_ios.sh +++ b/configure_ios.sh @@ -10,7 +10,7 @@ srcDir="../vcmi" -Wno-dev \ -DCMAKE_TOOLCHAIN_FILE="$srcDir/ios.toolchain.cmake" \ -DPLATFORM=${1:-OS64} \ - -DDEPLOYMENT_TARGET=9.0 \ + -DDEPLOYMENT_TARGET=11.0 \ -DENABLE_BITCODE=0 \ -DCMAKE_BINARY_DIR=$(pwd) \ -DCMAKE_PREFIX_PATH="$boostPrefix;$ffmpegDir;$sdlLibsDir" \