diff --git a/pkg/apple/JITSupport.m b/pkg/apple/JITSupport.m index 0f9b1c2b23..009d1b53bd 100644 --- a/pkg/apple/JITSupport.m +++ b/pkg/apple/JITSupport.m @@ -33,8 +33,10 @@ extern int ptrace(int request, pid_t pid, caddr_t addr, int data); #define PT_SIGEXC 12 /* signals as exceptions for current_proc */ static void *exception_handler(void *argument) { +#if !TARGET_OS_TV mach_port_t port = *(mach_port_t *)argument; mach_msg_server(exc_server, 2048, port, 0); +#endif return NULL; } @@ -44,6 +46,7 @@ bool jb_has_debugger_attached(void) { } bool jb_enable_ptrace_hack(void) { +#if !TARGET_OS_TV bool debugged = jb_has_debugger_attached(); // Thanks to this comment: https://news.ycombinator.com/item?id=18431524 @@ -83,6 +86,7 @@ bool jb_enable_ptrace_hack(void) { // also hides actual crashes from the debugger. task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS, MACH_PORT_NULL, EXCEPTION_DEFAULT, THREAD_STATE_NONE); } +#endif return true; } diff --git a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj index 093eac0d66..3c70e1fec5 100644 --- a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj @@ -9,6 +9,8 @@ /* Begin PBXBuildFile section */ 0714E7142983A5AC00E6B45B /* libMoltenVK.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0714E7132983A5AC00E6B45B /* libMoltenVK.dylib */; }; 0714E7152983A5E500E6B45B /* libMoltenVK.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 0714E7132983A5AC00E6B45B /* libMoltenVK.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 073734A42A093A5700BF7397 /* JITSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 92A1F81727006CAE00DEAD2A /* JITSupport.m */; }; + 073734A62A093ACA00BF7397 /* AltKit in Frameworks */ = {isa = PBXBuildFile; productRef = 073734A52A093ACA00BF7397 /* AltKit */; }; 0789FC302A07847E00D042B7 /* AltKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0789FC2F2A07847E00D042B7 /* AltKit */; }; 07B7872D29E8FE8F0088B74F /* filters in Resources */ = {isa = PBXBuildFile; fileRef = 07B7872C29E8FE8F0088B74F /* filters */; }; 9204BE0D1D319EF300BD49DB /* griffin_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 50521A431AA23BF500185CC9 /* griffin_objc.m */; }; @@ -482,6 +484,7 @@ 0714E7142983A5AC00E6B45B /* libMoltenVK.dylib in Frameworks */, 926C77F121FD26E800103EDE /* GameController.framework in Frameworks */, 926C77EF21FD263800103EDE /* AudioToolbox.framework in Frameworks */, + 073734A62A093ACA00BF7397 /* AltKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1285,6 +1288,9 @@ dependencies = ( ); name = RetroArchTV; + packageProductDependencies = ( + 073734A52A093ACA00BF7397 /* AltKit */, + ); productName = RetroArchTV; productReference = 926C77D721FD1E6500103EDE /* RetroArchTV.app */; productType = "com.apple.product-type.application"; @@ -1495,6 +1501,7 @@ 92CC05BB21FE3C1700FF79F0 /* GCDWebServerFileRequest.m in Sources */, 92CC05AF21FE3C1700FF79F0 /* GCDWebServerFileResponse.m in Sources */, 9210C2F724B3A32D00E6FE7C /* griffin_cpp.cpp in Sources */, + 073734A42A093A5700BF7397 /* JITSupport.m in Sources */, 92CC05B321FE3C1700FF79F0 /* GCDWebServerStreamedResponse.m in Sources */, 92CC05A321FE3C1700FF79F0 /* GCDWebServerResponse.m in Sources */, ); @@ -1894,6 +1901,7 @@ "-DGLES_SILENCE_DEPRECATION", "-DGLSLANG_OSINCLUDE_UNIX", "-DHAVE_7ZIP", + "-DHAVE_ALTKIT", "-DHAVE_AUDIOMIXER", "-DHAVE_BTSTACK", "-DHAVE_BUILTINGLSLANG", @@ -2053,6 +2061,7 @@ "-DGLES_SILENCE_DEPRECATION", "-DGLSLANG_OSINCLUDE_UNIX", "-DHAVE_7ZIP", + "-DHAVE_ALTKIT", "-DHAVE_AUDIOMIXER", "-DHAVE_BTSTACK", "-DHAVE_BUILTINGLSLANG", @@ -2492,6 +2501,10 @@ /* End XCConfigurationList section */ /* Begin XCSwiftPackageProductDependency section */ + 073734A52A093ACA00BF7397 /* AltKit */ = { + isa = XCSwiftPackageProductDependency; + productName = AltKit; + }; 0789FC2F2A07847E00D042B7 /* AltKit */ = { isa = XCSwiftPackageProductDependency; productName = AltKit; diff --git a/pkg/apple/tvOS/Info.plist b/pkg/apple/tvOS/Info.plist index 926d12ca70..b02cb2485e 100644 --- a/pkg/apple/tvOS/Info.plist +++ b/pkg/apple/tvOS/Info.plist @@ -2,6 +2,10 @@ + ALTBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + ALTDeviceID + $(TARGET_DEVICE_IDENTIFIER) CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index ff2aa3380b..615859d792 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -42,9 +42,7 @@ #import #if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH) -#if TARGET_OS_IOS #import "JITSupport.h" -#endif id apple_platform; #else static id apple_platform; @@ -436,9 +434,7 @@ enum [self refreshSystemConfig]; [self showGameView]; -#if TARGET_OS_IOS jb_start_altkit(); -#endif rarch_main(argc, argv, NULL);