Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
Library: 全部/已拥有/已构建 filter with profile-only cards; console filter
LNPANDYe4befb154235
diff --git a/frontend-qt/nspb_qt/localization.py b/frontend-qt/nspb_qt/localization.pyindex d165aa0f..e322b2a1 100644--- a/frontend-qt/nspb_qt/localization.py+++ b/frontend-qt/nspb_qt/localization.py@@ -427,6 +427,12 @@ TABLE: dict[str, tuple[str, str, str, str]] = {'library.profileUpdated': ('游戏档案有更新', "This game's profile updated", "This game's profile updated", 'Spielprofil aktualisiert'),'library.profileUpdatedShort': ('档案有更新', 'Profile updated', 'Profile updated', 'Profil aktualisiert'),'library.profileUpdatedHelp': ('这个游戏的档案(dm/games)自上次构建后有了更改:修复、着色器表或兼容性调整。重新构建即可用上。', "This game's own profile (dm/games) changed since it was built: fixes, shader tables or compatibility work. Rebuild to get them.", "This game's own profile (dm/games) changed since it was built: fixes, shader tables or compatibility work. Rebuild to get them.", 'Das eigene Spielprofil (dm/games) hat sich seit dem Build geändert: Fehlerbehebungen, Shader-Tabellen oder Kompatibilitätsarbeit. Zum Übernehmen neu bauen.'),+ 'filter.all': ('全部', 'All', 'Alla', 'Alle'),+ 'filter.owned': ('已拥有', 'Owned', 'Im ägo', 'Im Besitz'),+ 'filter.built': ('已构建', 'Built', 'Byggda', 'Gebaut'),+ 'library.notOwned': ('未拥有', 'Not owned', 'Ej ägd', 'Nicht im Besitz'),+ 'library.notOwnedShort': ('未拥有', 'Not owned', 'Ej ägd', 'Nicht im Besitz'),+ 'library.notOwnedHint': ('这个游戏在 nxnative 的支持列表里:把它的文件加入游戏文件夹后即可构建。', 'This game is in nxnative’s supported list: add its files to your games folder and it builds.', 'Spelet finns i nxnatives lista: lägg till dess filer i din spelmapp så byggs det.', 'Dieses Spiel ist in nxnatives Liste: füge seine Dateien in deinen Spieleordner ein, dann lässt es sich bauen.'),'library.rebuild': ('用当前工具重新构建…', 'Rebuild with current tools…', 'Bygg om med aktuella verktyg …', 'Mit aktuellen Werkzeugen neu bauen …'),'library.rebuildShort': ('重新构建', 'Rebuild', 'Bygg om', 'Neu bauen'),'library.buildForMac': ('为 Mac 构建', 'Build for Mac', 'Bygg för Mac', 'Für Mac bauen'),diff --git a/frontend/Sources/NSPortBuilder/ConsoleView.swift b/frontend/Sources/NSPortBuilder/ConsoleView.swiftindex a65c2092..85187bda 100644--- a/frontend/Sources/NSPortBuilder/ConsoleView.swift+++ b/frontend/Sources/NSPortBuilder/ConsoleView.swift@@ -22,6 +22,23 @@ enum ConsoleInput {}}+/// The console collection's filter ("全部 / 已构建 / iPhone"): display-only over the driver's games.+enum ConsoleFilter: String, CaseIterable, Identifiable {+ case all, built, iphone++ var id: String { rawValue }++ func label(_ lang: Lang) -> String {+ let zh = ["全部", "已构建", "iPhone"]+ let de = ["Alle", "Gebaut", "iPhone"]+ switch lang {+ case .zh: return zh[Self.allCases.firstIndex(of: self)!]+ case .de: return de[Self.allCases.firstIndex(of: self)!]+ default: return ["All", "Built", "iPhone"][Self.allCases.firstIndex(of: self)!]+ }+ }+}+@MainActor struct ConsoleView<Driver: ConsoleDriver>: View {@ObservedObject var driver: Drivervar lang: Lang = .initial()@@ -35,6 +52,16 @@ enum ConsoleInput {@StateObject private var gamepad: LauncherGamepad@State private var tileFrames: [String: CGRect] = [:]@State private var updateAlert: String?+ /// The collection filter ("全部 / 已构建 / iPhone"): display-only, the driver keeps every game.+ @State private var consoleFilter: ConsoleFilter = .all++ private var visibleGames: [ConsoleGame] {+ switch consoleFilter {+ case .all: return state.games+ case .built: return state.games.filter { $0.status == .ready }+ case .iphone: return state.games.filter { $0.platforms.contains(.iphone) || $0.status == .iphoneOnly }+ }+ }/// The glyph set follows the input used last: a controller's own buttons, or key caps after the keyboard.@State private var glyphs: ConsoleGlyphs@@ -200,6 +227,22 @@ enum ConsoleInput {.buttonStyle(.plain).accessibilityLabel(String(format: lang == .zh ? "更新 %@" : "Update %@", updateTag))}+ if state.games.count > 1 {+ HStack(spacing: compact ? 5 : 7) {+ ForEach([ConsoleFilter.all, .built, .iphone]) { f in+ Button { withAnimation(.easeInOut(duration: 0.15)) { consoleFilter = f } } label: {+ Text(f.label(lang)).font(.manrope(compact ? 11 : 13, consoleFilter == f ? .bold : .medium))+ .padding(.horizontal, compact ? 8 : 11).padding(.vertical, compact ? 4 : 6)+ .background(consoleFilter == f ? Color.white.opacity(0.14) : Color.white.opacity(0.05), in: Capsule())+ .overlay(Capsule().strokeBorder(consoleFilter == f ? Color.white.opacity(0.3) : Color.white.opacity(0.08)))+ .contentShape(Capsule())+ }+ .buttonStyle(.plain)+ .accessibilityAddTraits(consoleFilter == f ? .isSelected : [])+ .accessibilityLabel(f.label(lang))+ }+ }+ }Text(state.time, style: .time).font(.manrope(compact ? 17 : 22, .medium)).monospacedDigit().foregroundStyle(.white.opacity(0.65)).fixedSize()}@@ -217,7 +260,7 @@ enum ConsoleInput {return ScrollViewReader { proxy inScrollView(.horizontal, showsIndicators: false) {HStack(alignment: .top, spacing: (compact ? 22 : 28) - 16) {- ForEach(state.games) { game in+ ForEach(visibleGames) { game inlet selected = state.focusedGame?.id == game.idButton { driver.focus(game.id); driver.play(game.id) } label: {ConsoleGameTile(game: game, selected: selected, compact: compact, lang: lang, captionVisible: tileVisible(game.id, rowWidth: size.width - 2 * (inset - 8)))diff --git a/frontend/Sources/NSPortBuilder/LauncherView.swift b/frontend/Sources/NSPortBuilder/LauncherView.swiftindex eed647cb..cca0367c 100644--- a/frontend/Sources/NSPortBuilder/LauncherView.swift+++ b/frontend/Sources/NSPortBuilder/LauncherView.swift@@ -21,6 +21,16 @@ enum LauncherPalette {static let unbuilt = Color(red: 0.57, green: 0.58, blue: 0.61)}+/// The library's filter ("全部 / 已拥有 / 已构建"): remembered between launches.+enum LibraryFilter: String, CaseIterable, Identifiable {+ case all, owned, built+ var id: String { rawValue }+ var labelKey: String { "filter." + rawValue }++ static func load() -> LibraryFilter { LibraryFilter(rawValue: UserDefaults.standard.string(forKey: "libraryFilter") ?? "") ?? .all }+ func save() { UserDefaults.standard.set(rawValue, forKey: "libraryFilter") }+}+struct ContentView: View {@StateObject private var m: BuildModel@StateObject private var library: GameLibrary@@ -84,8 +94,33 @@ struct ContentView: View {if injectedDriver { consoleDriver.setPadMerge(on) }}+ /// The games nxnative has profiles for, loaded from the checkout's dm/games: the "All" filter shows+ /// these beside the player's own, covers scraped the same way.+ @State private var supportedGames: [LibraryGame] = []+ /// A profile-only card the player focused: it has no build, so the hero shows a hint instead of Play.+ @State private var selectedUnowned: String?+ @State private var libraryFilter: LibraryFilter = LibraryFilter.load() {+ didSet { if libraryFilter != oldValue { libraryFilter.save(); selectedUnowned = nil; library.selectedID = nil } }+ }++ private func loadSupportedGames() {+ supportedGames = SupportedGames.load(repo: m.repoPath)+ }++ private func isUnowned(_ game: LibraryGame) -> Bool {+ !library.games.contains { $0.titleID == game.titleID }+ }+private var filteredGames: [LibraryGame] {- library.games.filter { search.isEmpty || $0.name.localizedCaseInsensitiveContains(search) }+ let owned = library.games.filter { search.isEmpty || $0.name.localizedCaseInsensitiveContains(search) }+ let unowned = supportedGames+ .filter { s in !library.games.contains { $0.titleID == s.titleID } }+ .filter { search.isEmpty || $0.name.localizedCaseInsensitiveContains(search) }+ switch libraryFilter {+ case .all: return owned + unowned+ case .owned: return owned+ case .built: return owned.filter { $0.isReady || $0.hasIOSBuild }+ }}var body: some View {@@ -164,6 +199,7 @@ struct ContentView: View {refreshArtwork()readSignatures()if performStartupChecks { library.discover(); fetchArtwork(); m.refreshDevices(); checkTools() }+ loadSupportedGames()if performStartupChecks {m.checkDeps()if m.repoOK && m.repoIsGit { m.checkRepoUpdates(silent: true) } else { m.adoptAtLaunch() }@@ -182,7 +218,7 @@ struct ContentView: View {readSignatures()if performStartupChecks { fetchArtwork() }}- .onChange(of: m.repoPath) { _ in refreshArtwork(); if performStartupChecks { checkTools() } }+ .onChange(of: m.repoPath) { _ in refreshArtwork(); loadSupportedGames(); if performStartupChecks { checkTools() } }// A clone, pull or update check has finished (the automatic pull at launch among them): the checkout may have moved.onReceive(m.$repoBusy.removeDuplicates().dropFirst()) { busy in if !busy && performStartupChecks { checkTools() } }.onChange(of: library.selectedID) { _ in resignNote = nil } // the last re-sign's note belongs to its game@@ -391,13 +427,14 @@ struct ContentView: View {private var libraryPage: some View {GeometryReader { geometry in- if library.games.isEmpty {+ if library.games.isEmpty && supportedGames.isEmpty {emptyLibrary} else {ScrollView {VStack(alignment: .leading, spacing: 0) {- if let game = library.selected {- hero(game, width: geometry.size.width, height: max(240, geometry.size.height - collectionHeight))+ if let entry = currentHero {+ hero(entry.game, unowned: entry.unowned,+ width: geometry.size.width, height: max(240, geometry.size.height - collectionHeight))}// The hero takes what the collection leaves: the row's height grows with the window's width (its cards// do, up to 300 pt), so a fixed share left a fullscreen window's cards cut off at the bottom@@ -435,7 +472,7 @@ struct ContentView: View {.padding(48).frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)}- private func hero(_ game: LibraryGame, width: CGFloat, height: CGFloat) -> some View {+ private func hero(_ game: LibraryGame, unowned: Bool = false, width: CGFloat, height: CGFloat) -> some View {ZStack(alignment: .bottomLeading) {if let image = artwork[game.id] {Image(nsImage: image).resizable().scaledToFill()@@ -470,6 +507,11 @@ struct ContentView: View {Text(game.name).font(.manrope(min(68, width * 0.052), .heavy)).tracking(-1.6).lineLimit(2).shadow(color: .black.opacity(0.25), radius: 12)HStack(spacing: 18) {+ if unowned {+ Text(m.t("library.notOwnedHint"))+ .font(.manrope(14)).foregroundStyle(.secondary)+ .fixedSize(horizontal: false, vertical: true).frame(maxWidth: 460, alignment: .leading)+ } else {Button { primaryAction(game) } label: {Label(game.primary == .play ? m.t("library.play"): (game.primary == .openOnDevice ? String(format: m.t("dev.open"), m.deviceName(game.installedDevice))@@ -497,6 +539,7 @@ struct ContentView: View {.buttonStyle(.plain).accessibilityLabel(m.t("library.manage")).anchorPreference(key: ManageAnchorKey.self, value: .bounds) { $0 }.padTarget("hero.manage", scope: "main", radius: 12) { manageOpenFor = game.id }+ }}// A free Apple ID's provisioning profile lasts 7 days. Say when this app's runs out, and offer the// re-sign at any time: renewing early (before a trip, say) is as valid as renewing just in time.@@ -530,6 +573,17 @@ struct ContentView: View {.frame(width: width, height: height).clipped()}+ /// The hero's game: the player's selection, else the focused profile-only card. The unowned flag rides+ /// along (a transient var on the copy, never persisted).+ private var currentHero: (game: LibraryGame, unowned: Bool)? {+ if let id = selectedUnowned, let game = supportedGames.first(where: { $0.titleID == id }) {+ return (game, true)+ }+ if library.selectedID == nil, let first = filteredGames.first { return (first, isUnowned(first)) }+ if let game = filteredGames.first(where: { $0.id == library.selectedID }) { return (game, isUnowned(game)) }+ return nil+ }+private func collection(width: CGFloat) -> some View {let cardWidth = min(300, max(190, (width - 124) / 5))let step = cardWidth + 14@@ -537,9 +591,26 @@ struct ContentView: View {HStack {Text(m.t("library.collection")).font(.manrope(28, .bold)).tracking(-0.6)Spacer()- Text(String(format: m.t("library.gameCount"), library.games.count))+ Text(String(format: m.t("library.gameCount"), filteredGames.count)).font(.manrope(12)).foregroundStyle(.secondary)}+ HStack(spacing: 8) {+ ForEach(LibraryFilter.allCases) { f in+ Button {+ withAnimation(.easeInOut(duration: 0.2)) { libraryFilter = f }+ } label: {+ Text(m.t(f.labelKey)).font(.manrope(13, libraryFilter == f ? .bold : .medium))+ .padding(.horizontal, 14).padding(.vertical, 7)+ .background(libraryFilter == f ? Color.white.opacity(0.12) : Color.white.opacity(0.05),+ in: Capsule())+ .overlay(Capsule().strokeBorder(libraryFilter == f ? LauncherPalette.cream.opacity(0.55) : Color.white.opacity(0.08)))+ .contentShape(Capsule())+ }+ .buttonStyle(.plain)+ .accessibilityAddTraits(libraryFilter == f ? .isSelected : [])+ }+ Spacer()+ }if filteredGames.isEmpty {Text(m.t("library.noResults")).foregroundStyle(.secondary).padding(.vertical, 28)} else {@@ -547,7 +618,10 @@ struct ContentView: View {ScrollView(.horizontal, showsIndicators: false) {HStack(alignment: .top, spacing: 14) {ForEach(filteredGames) { game in- Button { library.selectedID = game.id } label: {+ let unowned = isUnowned(game)+ Button {+ if unowned { selectedUnowned = game.titleID } else { selectedUnowned = nil; library.selectedID = game.id }+ } label: {VStack(alignment: .leading, spacing: 8) {ZStack {if let image = artwork[game.id] {@@ -559,18 +633,29 @@ struct ContentView: View {}.frame(width: cardWidth, height: cardWidth / 1.8).clipped().clipShape(RoundedRectangle(cornerRadius: 5))+ .overlay(alignment: .topTrailing) {+ if unowned {+ Text(m.t("library.notOwnedShort"))+ .font(.manrope(10, .bold)).tracking(0.4)+ .foregroundStyle(.white).padding(.horizontal, 7).padding(.vertical, 3)+ .background(LauncherPalette.unbuilt.opacity(0.85), in: Capsule())+ .padding(6)+ }+ }.overlay(RoundedRectangle(cornerRadius: 5).strokeBorder(- game.id == library.selectedID ? LauncherPalette.cream : .clear, lineWidth: 2))+ (unowned ? selectedUnowned == game.titleID : game.id == library.selectedID) ? LauncherPalette.cream : .clear, lineWidth: 2))Text(game.name).font(.manrope(16, .semibold)).lineLimit(1)status(game)- Capsule().fill(game.id == library.selectedID ? LauncherPalette.cream : .clear)+ Capsule().fill((unowned ? selectedUnowned == game.titleID : game.id == library.selectedID) ? LauncherPalette.cream : .clear).frame(height: 3).padding(.top, 4)}.frame(width: cardWidth, alignment: .leading).contentShape(Rectangle())}.buttonStyle(.plain)- .accessibilityAddTraits(game.id == library.selectedID ? .isSelected : [])- .padTarget("card." + game.id.uuidString, scope: "main", radius: 7) { if !launching { primaryAction(game) } }+ .accessibilityAddTraits((unowned ? selectedUnowned == game.titleID : game.id == library.selectedID) ? .isSelected : [])+ .padTarget("card." + game.id.uuidString, scope: "main", radius: 7) {+ if !launching && !unowned { primaryAction(game) } // a profile-only card has nothing to run+ }}}// Room for the controller's focus ring, which sits 4 pt outside a card: the row clips at its edges, so itdiff --git a/frontend/Sources/NSPortBuilder/Localization.swift b/frontend/Sources/NSPortBuilder/Localization.swiftindex 8332fcde..f0b1a383 100644--- a/frontend/Sources/NSPortBuilder/Localization.swift+++ b/frontend/Sources/NSPortBuilder/Localization.swift@@ -470,6 +470,12 @@ enum L10n {"library.profileUpdated": ("游戏档案有更新", "This game's profile updated"),"library.profileUpdatedShort": ("档案有更新", "Profile updated"),"library.profileUpdatedHelp": ("这个游戏的档案(dm/games)自上次构建后有了更改:修复、着色器表或兼容性调整。重新构建即可用上。", "This game's own profile (dm/games) changed since it was built: fixes, shader tables or compatibility work. Rebuild to get them."),+ "filter.all": ("全部", "All"),+ "filter.owned": ("已拥有", "Owned"),+ "filter.built": ("已构建", "Built"),+ "library.notOwned": ("未拥有", "Not owned"),+ "library.notOwnedShort": ("未拥有", "Not owned"),+ "library.notOwnedHint": ("这个游戏在 nxnative 的支持列表里:把它的文件加入游戏文件夹后即可构建。", "This game is in nxnative\u{2019}s supported list: add its files to your games folder and it builds."),"library.rebuild": ("用当前工具重新构建…", "Rebuild with current tools…"),"library.rebuildShort": ("重新构建", "Rebuild"),"library.buildForMac": ("\u{4e3a} Mac \u{6784}\u{5efa}", "Build for Mac"),@@ -1368,6 +1374,12 @@ enum L10n {"library.play": "Spela","library.olderTools": "Byggt med äldre verktyg","library.olderToolsShort": "Äldre verktyg",+ "filter.all": "Alla",+ "filter.owned": "Im ägo",+ "filter.built": "Byggda",+ "library.notOwned": "Ej ägd",+ "library.notOwnedShort": "Ej ägd",+ "library.notOwnedHint": "Spelet finns i nxnatives lista: lägg till dess filer i din spelmapp så byggs det.","library.olderToolsHelp": "Byggverktygen har ändrats på ett sätt som påverkar spelet sedan det byggdes. Bygg om det för att få ändringarna.","library.rebuild": "Bygg om med aktuella verktyg …","library.rebuildShort": "Bygg om",@@ -2221,6 +2233,12 @@ enum L10n {"library.olderTools": "Mit älteren Werkzeugen gebaut","library.olderToolsShort": "Ältere Werkzeuge","library.olderToolsHelp": "Die Build-Werkzeuge haben sich seit dem Build so geändert, dass es dieses Spiel betrifft. Baue es neu, um die Änderungen zu bekommen.",+ "filter.all": "Alle",+ "filter.owned": "Im Besitz",+ "filter.built": "Gebaut",+ "library.notOwned": "Nicht im Besitz",+ "library.notOwnedShort": "Nicht im Besitz",+ "library.notOwnedHint": "Dieses Spiel ist in nxnatives Liste: füge seine Dateien in deinen Spieleordner ein, dann lässt es sich bauen.","library.pin": "Diesen Build behalten","library.pinHelp": "Dieser Build ist als spielbar bekannt. Engine-Updates markieren ihn nicht mehr als älter. Änderungen am Spielprofil werden weiterhin gezeigt.","library.unpin": "Build nicht mehr behalten",@@ -2733,4 +2751,4 @@ enum L10n {for (key, row) in table where row.zh.isEmpty || row.en.isEmpty { bad.append(key) }return bad}-}+}\ No newline at end of filediff --git a/frontend/Sources/NSPortBuilder/SupportedGames.swift b/frontend/Sources/NSPortBuilder/SupportedGames.swiftnew file mode 100644index 00000000..b9225713--- /dev/null+++ b/frontend/Sources/NSPortBuilder/SupportedGames.swift@@ -0,0 +1,27 @@+import Foundation++/// Every game nxnative has a profile for: `dm/games/<title ID>/game.tsv` of the checkout. The library's+/// "All" filter shows these beside the games the player owns, covers scraped the same way, so the+/// collection doubles as the list of what the engine supports today.+enum SupportedGames {+ /// Lightweight library entries (title ID and name only, no paths). A game the player owns is matched+ /// by title ID and shown from their own entry instead.+ static func load(repo: String) -> [LibraryGame] {+ guard !repo.isEmpty else { return [] }+ let fm = FileManager.default+ let gamesDir = repo + "/dm/games"+ guard let entries = try? fm.contentsOfDirectory(atPath: gamesDir) else { return [] }+ var games: [LibraryGame] = []+ for entry in entries.sorted() {+ guard entry.count == 16, entry.allSatisfy(\.isHexDigit), entry != "0000000000000000" else { continue }+ let tsv = gamesDir + "/" + entry + "/game.tsv"+ guard let text = try? String(contentsOfFile: tsv, encoding: .utf8) else { continue }+ let name = text.split(separator: "\n").compactMap { line -> String? in+ let parts = line.split(separator: "\t", maxSplits: 1)+ return parts.first == "name" && parts.count > 1 ? String(parts[1]) : nil+ }.first ?? entry+ games.append(LibraryGame(titleID: entry, name: name))+ }+ return games+ }+}diff --git a/frontend/Tests/NSPortBuilderTests/SupportedGamesTests.swift b/frontend/Tests/NSPortBuilderTests/SupportedGamesTests.swiftnew file mode 100644index 00000000..48476c54--- /dev/null+++ b/frontend/Tests/NSPortBuilderTests/SupportedGamesTests.swift@@ -0,0 +1,42 @@+import XCTest+@testable import NSPortBuilder++/// The "All" filter's data (SupportedGames.swift): every profile in the checkout's dm/games becomes a+/// lightweight library entry, owned games matched later by title ID.+final class SupportedGamesTests: XCTestCase {+ private var repo: URL!++ override func setUpWithError() throws {+ repo = FileManager.default.temporaryDirectory.appendingPathComponent("supported-" + UUID().uuidString)+ for (id, name) in [("0100535012974000", "Hades"), ("0100152000022000", "Mario Kart 8 Deluxe")] {+ let dir = repo.appendingPathComponent("dm/games/\(id)")+ try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)+ try "program_id\t\(id)\nname\t\(name)\n".write(to: dir.appendingPathComponent("game.tsv"), atomically: true, encoding: .utf8)+ }+ // Not profiles: a stray folder with a non-ID name, a folder without game.tsv, tests and docs+ try FileManager.default.createDirectory(at: repo.appendingPathComponent("dm/games/notes"), withIntermediateDirectories: true)+ try FileManager.default.createDirectory(at: repo.appendingPathComponent("dm/games/0100F2C0115B6000"), withIntermediateDirectories: true)+ try "prose".write(to: repo.appendingPathComponent("dm/games/notes/README.md"), atomically: true, encoding: .utf8)+ }++ override func tearDownWithError() throws { try? FileManager.default.removeItem(at: repo) }++ func testEveryProfileFolderBecomesAnEntryNamedFromItsTable() {+ let games = SupportedGames.load(repo: repo.path)+ XCTAssertEqual(games.map(\.titleID), ["0100152000022000", "0100535012974000"])+ XCTAssertEqual(games.map(\.name), ["Mario Kart 8 Deluxe", "Hades"])+ }++ func testAnEntryHasNoPathsAndIsNotReady() {+ for game in SupportedGames.load(repo: repo.path) {+ XCTAssertEqual(game.appPath, "")+ XCTAssertFalse(game.isReady)+ XCTAssertEqual(game.inputs, [:])+ }+ }++ func testAnEmptyOrMissingRepoGivesNothing() {+ XCTAssertTrue(SupportedGames.load(repo: "").isEmpty)+ XCTAssertTrue(SupportedGames.load(repo: repo.appendingPathComponent("missing").path).isEmpty)+ }+}