From 73fdd76139f78f625606c31b218c4be0f6671a4e Mon Sep 17 00:00:00 2001 From: lbibass Date: Sun, 24 Oct 2021 16:46:27 -0400 Subject: [PATCH 1/3] Add SteamController to DeltaCore for SteamController support in Delta --- DeltaCore.xcodeproj/project.pbxproj | 46 +++++++++++++++++-- .../contents.xcworkspacedata | 2 +- .../ExternalGameControllerManager.swift | 1 + .../MFi/MFiGameController.swift | 2 +- 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/DeltaCore.xcodeproj/project.pbxproj b/DeltaCore.xcodeproj/project.pbxproj index baae111..48facec 100644 --- a/DeltaCore.xcodeproj/project.pbxproj +++ b/DeltaCore.xcodeproj/project.pbxproj @@ -3,10 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ + 2BF284A22725FD4E000913E5 /* SteamController in Frameworks */ = {isa = PBXBuildFile; productRef = 2BF284A12725FD4E000913E5 /* SteamController */; }; BF0B260B23E91745007BE38B /* Bundle+Resources.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0B260A23E91745007BE38B /* Bundle+Resources.swift */; }; BF0BC4FA225C138A000151C6 /* BitmapProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0BC4F9225C138A000151C6 /* BitmapProcessor.swift */; }; BF0BC4FD225C15E8000151C6 /* OpenGLESProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0BC4FC225C15E8000151C6 /* OpenGLESProcessor.swift */; }; @@ -170,6 +171,7 @@ buildActionMask = 2147483647; files = ( BFCBD91C20CC6F790028E309 /* ZIPFoundation.framework in Frameworks */, + 2BF284A22725FD4E000913E5 /* SteamController in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -479,6 +481,9 @@ BFA07F07221F3A070012699D /* PBXTargetDependency */, ); name = DeltaCore; + packageProductDependencies = ( + 2BF284A12725FD4E000913E5 /* SteamController */, + ); productName = DeltaCore; productReference = BF46895D1AACF36800A2586D /* DeltaCore.framework */; productType = "com.apple.product-type.framework"; @@ -509,6 +514,9 @@ Base, ); mainGroup = BF4689531AACF36800A2586D; + packageReferences = ( + 2BF284A02725FD4E000913E5 /* XCRemoteSwiftPackageReference "SteamController" */, + ); productRefGroup = BF46895E1AACF36800A2586D /* Products */; projectDirPath = ""; projectReferences = ( @@ -534,7 +542,7 @@ }; BFCBD91320CC6F6F0028E309 /* ZIPFoundationTests.xctest */ = { isa = PBXReferenceProxy; - fileType = file; + fileType = wrapper.cfbundle; path = ZIPFoundationTests.xctest; remoteRef = BFCBD91220CC6F6F0028E309 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; @@ -759,7 +767,11 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_SWIFT_FLAGS = "-Xfrontend -debug-time-function-bodies"; PRODUCT_BUNDLE_IDENTIFIER = "com.rileytestut.$(PRODUCT_NAME:rfc1034identifier)"; SKIP_INSTALL = YES; @@ -780,12 +792,17 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_SWIFT_FLAGS = "-Xfrontend -debug-time-function-bodies"; PRODUCT_BUNDLE_IDENTIFIER = "com.rileytestut.$(PRODUCT_NAME:rfc1034identifier)"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = FRAMEWORK; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; }; name = Release; @@ -812,6 +829,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 2BF284A02725FD4E000913E5 /* XCRemoteSwiftPackageReference "SteamController" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/zydeco/SteamController"; + requirement = { + branch = master; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 2BF284A12725FD4E000913E5 /* SteamController */ = { + isa = XCSwiftPackageProductDependency; + package = 2BF284A02725FD4E000913E5 /* XCRemoteSwiftPackageReference "SteamController" */; + productName = SteamController; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = BF4689541AACF36800A2586D /* Project object */; } diff --git a/DeltaCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DeltaCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 65da913..919434a 100644 --- a/DeltaCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/DeltaCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/DeltaCore/Game Controllers/ExternalGameControllerManager.swift b/DeltaCore/Game Controllers/ExternalGameControllerManager.swift index c6d4025..1af2cfb 100644 --- a/DeltaCore/Game Controllers/ExternalGameControllerManager.swift +++ b/DeltaCore/Game Controllers/ExternalGameControllerManager.swift @@ -8,6 +8,7 @@ import Foundation import GameController +import SteamController private let ExternalKeyboardStatusDidChange: @convention(c) (CFNotificationCenter?, UnsafeMutableRawPointer?, CFNotificationName?, UnsafeRawPointer?, CFDictionary?) -> Void = { (notificationCenter, observer, name, object, userInfo) in diff --git a/DeltaCore/Game Controllers/MFi/MFiGameController.swift b/DeltaCore/Game Controllers/MFi/MFiGameController.swift index b95cb70..e4ba945 100644 --- a/DeltaCore/Game Controllers/MFi/MFiGameController.swift +++ b/DeltaCore/Game Controllers/MFi/MFiGameController.swift @@ -7,7 +7,7 @@ // import GameController - +import SteamControll public extension GameControllerInputType { static let mfi = GameControllerInputType("mfi") From 1c874204476222bdbe1d36252f41f8da0b89e27a Mon Sep 17 00:00:00 2001 From: lbibass Date: Sun, 24 Oct 2021 16:47:26 -0400 Subject: [PATCH 2/3] fix typo --- DeltaCore/Game Controllers/MFi/MFiGameController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeltaCore/Game Controllers/MFi/MFiGameController.swift b/DeltaCore/Game Controllers/MFi/MFiGameController.swift index e4ba945..4a2f247 100644 --- a/DeltaCore/Game Controllers/MFi/MFiGameController.swift +++ b/DeltaCore/Game Controllers/MFi/MFiGameController.swift @@ -7,7 +7,7 @@ // import GameController -import SteamControll +import SteamController public extension GameControllerInputType { static let mfi = GameControllerInputType("mfi") From 4735ed22467ae67877806286f86744647dbebf0e Mon Sep 17 00:00:00 2001 From: lbibass Date: Sun, 24 Oct 2021 17:36:05 -0400 Subject: [PATCH 3/3] fixed delta core address --- DeltaCore.podspec | 4 ++-- Package.swift | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DeltaCore.podspec b/DeltaCore.podspec index 2a143de..f6a09f3 100644 --- a/DeltaCore.podspec +++ b/DeltaCore.podspec @@ -3,9 +3,9 @@ Pod::Spec.new do |spec| spec.version = "0.1" spec.summary = "iOS Emulator Plug-in Framework" spec.description = "iOS framework that powers Delta emulator." - spec.homepage = "https://github.com/rileytestut/DeltaCore" + spec.homepage = "https://github.com/lbibass/DeltaCore" spec.platform = :ios, "12.0" - spec.source = { :git => "https://github.com/rileytestut/DeltaCore.git" } + spec.source = { :git => "https://github.com/lbibass/DeltaCore.git" } spec.author = { "Riley Testut" => "riley@rileytestut.com" } spec.social_media_url = "https://twitter.com/rileytestut" diff --git a/Package.swift b/Package.swift index c5444b8..58a7af0 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,8 @@ let package = Package( .library(name: "DeltaCore", targets: ["DeltaCore", "CDeltaCore"]), ], dependencies: [ - .package(name: "ZIPFoundation", url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMinor(from: "0.9.11")) + .package(name: "ZIPFoundation", url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMinor(from: "0.9.11")), + .package(name:"SteamController", url:"https://github.com/zydeco/SteamController", .branch("master")) ], targets: [ .target(