From dd6a04a52580d8aaa4ea40fcd5ad9747f8bf739c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 10 May 2024 10:12:14 +0200 Subject: [PATCH] iOS: Default to 2x internal resolution, slight build script improvements --- CMakeLists.txt | 6 ++++-- Core/Config.cpp | 6 ++++-- b-appstore.sh | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8480b1de8..749f788478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2865,9 +2865,10 @@ if(IOS AND NOT LIBRETRO) message(STATUS "DevTeam: ${DEVELOPMENT_TEAM_ID} Icon: ${ICON_NAME} Target: ${TargetBin}") message(STATUS "CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}") - # This is for injecting the version into the plist. + # This is for injecting the version into the plist, and also copying resources. + # Should find a different way to do both these things. add_custom_command(TARGET ${TargetBin} POST_BUILD - COMMAND echo "Creating ${APP_DIR_NAME}" + COMMAND echo "Creating ${APP_DIR_NAME} for app store build" COMMAND mkdir -p \"${APP_DIR_NAME}\" # This tar command seems to be responsible for copying assets. I thought we had another step that did that.. # Prepend -v to the extracting command to see the files copied. @@ -2907,6 +2908,7 @@ if(IOS AND NOT LIBRETRO) else() # This is for injecting the version into the plist. add_custom_command(TARGET PPSSPP POST_BUILD + COMMAND echo "Creating ${APP_DIR_NAME} for sideload build" COMMAND mkdir -p \"${APP_DIR_NAME}\" COMMAND tar -c -C ${CMAKE_CURRENT_BINARY_DIR} --exclude .DS_Store --exclude .git assets *.png | tar -x -C \"${APP_DIR_NAME}\" COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/ios/macbundle.sh" \"${APP_DIR_NAME}\" diff --git a/Core/Config.cpp b/Core/Config.cpp index 6f259b6eb5..77f5cb3bcd 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -357,9 +357,11 @@ static const ConfigSetting cpuSettings[] = { }; static int DefaultInternalResolution() { - // Auto on Windows and Linux, 2x on large screens, 1x elsewhere. + // Auto on Windows and Linux, 2x on large screens and iOS, 1x elsewhere. #if defined(USING_WIN_UI) || defined(USING_QT_UI) return 0; +#elif PPSSPP_PLATFORM(IOS) + return 2; #else if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_VR) { return 4; @@ -380,7 +382,7 @@ static int DefaultFastForwardMode() { } static int DefaultAndroidHwScale() { -#ifdef __ANDROID__ +#if PPSSPP_PLATFORM(ANDROID) if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 19 || System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_TV) { // Arbitrary cutoff at Kitkat - modern devices are usually powerful enough that hw scaling // doesn't really help very much and mostly causes problems. See #11151 diff --git a/b-appstore.sh b/b-appstore.sh index f2b111d0d2..0cb1854f21 100755 --- a/b-appstore.sh +++ b/b-appstore.sh @@ -23,6 +23,7 @@ else echo "Non-GOLD build." fi +echo "Clearing and re-creating output directory" rm -rf $FOLDER_NAME mkdir $FOLDER_NAME @@ -39,5 +40,9 @@ popd # Avoid XCode race condition (???) by pre-generating git-version.cpp cmake -DSOURCE_DIR=. -DOUTPUT_DIR=$FOLDER_NAME -P git-version.cmake +echo +echo "*** Done. Now run the following command to open in XCode, then run or archive:" +echo " open $FOLDER_NAME/PPSSPP.xcodeproj" + # To open the xcode project: # open build-ios/PPSSPP.xcodeproj \ No newline at end of file