Disable external display by default

Configuration is in system settings
This commit is contained in:
Xie Yi 2019-06-19 17:47:14 +08:00
parent c0a1404308
commit 0e7c85d89e
4 changed files with 27 additions and 0 deletions

View File

@ -1988,6 +1988,7 @@ if(TargetBin)
endif()
if(IOS)
list(APPEND NativeAssets ios/Settings.bundle)
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource} "ios/Launch Screen.storyboard")
else()
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
@ -2044,6 +2045,7 @@ if(IOS)
set_target_properties(${TargetBin} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/PPSSPP-Info.plist"
RESOURCE "ios/Launch Screen.storyboard"
RESOURCE "ios/Settings.bundle"
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET}
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "iPhone/iPad"
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES

View File

@ -49,6 +49,10 @@
}
- (void)setupDisplayListener {
// Disable external display by default
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_external_display"] == NO) {
return;
}
if ([self listenerActive]) {
NSLog(@"setupDisplayListener already called");
return;

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>enable_external_display</string>
<key>Key</key>
<string>enable_external_display</string>
<key>DefaultValue</key>
<false/>
</dict>
</array>
</dict>
</plist>

Binary file not shown.