Manic EMU is an all-in-one retro game emulator for iOS. It packs powerful features while keeping a clean, sleek UI and delivering buttery-smooth gameplay.
Swift
Retroachievements MultiSet support; added GBA (gpSP) core;
Daiuno249372298171
diff --git a/Cores/gpsp.libretro.framework/Info.plist b/Cores/gpsp.libretro.framework/Info.plistnew file mode 100644index 00000000..cfaf0a4e--- /dev/null+++ b/Cores/gpsp.libretro.framework/Info.plist@@ -0,0 +1,3 @@+version https://git-lfs.github.com/spec/v1+oid sha256:f9630735b25570b1fd04f4ed3175653c9421312ce8073831e7d3e884f732c7c6+size 709diff --git a/Cores/gpsp.libretro.framework/_CodeSignature/CodeResources b/Cores/gpsp.libretro.framework/_CodeSignature/CodeResourcesnew file mode 100644index 00000000..78de0d16--- /dev/null+++ b/Cores/gpsp.libretro.framework/_CodeSignature/CodeResources@@ -0,0 +1,3 @@+version https://git-lfs.github.com/spec/v1+oid sha256:1a474caf2ff6bc826a27fd56101fca6d4884c94aeb875a8a39bdc4e494c6e2bf+size 1798diff --git a/Cores/gpsp.libretro.framework/gpsp.libretro b/Cores/gpsp.libretro.framework/gpsp.libretronew file mode 100755index 00000000..4ecd75ac--- /dev/null+++ b/Cores/gpsp.libretro.framework/gpsp.libretro@@ -0,0 +1,3 @@+version https://git-lfs.github.com/spec/v1+oid sha256:0518fa743cd8d73d57f64b413e24d4ebd2dc6c968e41cf906d16bbbe41dca8f7+size 559984diff --git a/Dependencies/Libretro b/Dependencies/Libretroindex c8a003fd..96e7f251 160000--- a/Dependencies/Libretro+++ b/Dependencies/Libretro@@ -1 +1 @@-Subproject commit c8a003fd03d343dddf3f3e17bf6fad69266c58bf+Subproject commit 96e7f2513397bc4e2e754e91938c57d4b8c44cb0diff --git a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj b/ManicEmu/ManicEmu.xcodeproj/project.pbxprojindex e040d29e..3a055bc9 100644--- a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj+++ b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj@@ -795,6 +795,9 @@57909584303C7D9100A53656 /* picodrive.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57655C1E2DF6B94C003E4A6E /* picodrive.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };57909585303C7D9100A53656 /* nestopia.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57F0D83C2DE2C59900760F57 /* nestopia.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };57909586303C7D9100A53656 /* ppsspp.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57BFBE712DD3360A00AABF98 /* ppsspp.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };+ 57909605303D793A00A53656 /* gpsp.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57909600303D792500A53656 /* gpsp.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };+ 57909608303D794200A53656 /* gpsp.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57909600303D792500A53656 /* gpsp.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };+ 5790960E303D795200A53656 /* gpsp.libretro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57909600303D792500A53656 /* gpsp.libretro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };57913AF52D5D89CF004D51AA /* TouchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57913AF42D5D89CC004D51AA /* TouchController.swift */; };57913B422D5ED722004D51AA /* GameInfoCoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57913B412D5ED722004D51AA /* GameInfoCoverView.swift */; };57913B532D5EF725004D51AA /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57913B522D5EF71D004D51AA /* DateExtension.swift */; };@@ -1610,6 +1613,7 @@dstPath = "";dstSubfolderSpec = 10;files = (+ 5790960E303D795200A53656 /* gpsp.libretro.framework in Embed Frameworks */,5790955E303C7D9100A53656 /* puae.libretro.framework in Embed Frameworks */,5790955F303C7D9100A53656 /* vice.x64sc.libretro.framework in Embed Frameworks */,57909560303C7D9100A53656 /* mednafen.ngp.libretro.framework in Embed Frameworks */,@@ -1671,6 +1675,7 @@dstPath = "";dstSubfolderSpec = 10;files = (+ 57909605303D793A00A53656 /* gpsp.libretro.framework in Embed Frameworks */,16D61BE375CD4F61ACCF0FF2 /* puae.libretro.framework in Embed Frameworks */,E5385955E04D43598CAC5694 /* vice.x64sc.libretro.framework in Embed Frameworks */,0750DCA306CA4EB7A036C987 /* mednafen.ngp.libretro.framework in Embed Frameworks */,@@ -1722,6 +1727,7 @@dstPath = "";dstSubfolderSpec = 10;files = (+ 57909608303D794200A53656 /* gpsp.libretro.framework in Embed Frameworks */,E2162239F8584ED6843B9760 /* puae.libretro.framework in Embed Frameworks */,2197E4E9458342E6AF80B1BA /* vice.x64sc.libretro.framework in Embed Frameworks */,5F74DFC689D94836B20159EB /* mednafen.ngp.libretro.framework in Embed Frameworks */,@@ -2061,11 +2067,11 @@578F28E92F3A055F00D2D998 /* CollectionFooterReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionFooterReusableView.swift; sourceTree = "<group>"; };579076EF2D8AAC2800ED90FB /* TransparentHoleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransparentHoleView.swift; sourceTree = "<group>"; };5790958B303C7D9100A53656 /* ManicEmuSideload.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ManicEmuSideload.app; sourceTree = BUILT_PRODUCTS_DIR; };+ 57909600303D792500A53656 /* gpsp.libretro.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = gpsp.libretro.framework; sourceTree = "<group>"; };57913AF42D5D89CC004D51AA /* TouchController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchController.swift; sourceTree = "<group>"; };57913B412D5ED722004D51AA /* GameInfoCoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameInfoCoverView.swift; sourceTree = "<group>"; };57913B522D5EF71D004D51AA /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };579213522D95313800E88819 /* BaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNavigationController.swift; sourceTree = "<group>"; };- 5792E7302F83B2560015CE0E /* mupen64plus.next.jit.libretro.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mupen64plus.next.jit.libretro.framework; path = ../Cores/mupen64plus.next.jit.libretro.framework; sourceTree = SOURCE_ROOT; };579453BE2FE429CD00D32DD6 /* ASSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASSheet.swift; sourceTree = "<group>"; };579454212FE683F000D32DD6 /* ASTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTextView.swift; sourceTree = "<group>"; };5796DAEF2FE413C70051F661 /* ASListPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASListPage.swift; sourceTree = "<group>"; };@@ -12489,13 +12495,13 @@5744C71B2E375EFF0088081A /* pokemini.libretro.framework */,5754D8C22E27A562001EA5ED /* mednafen.vb.libretro.framework */,57D0BC0D2E1AD31A008C3049 /* mupen64plus.next.libretro.framework */,- 5792E7302F83B2560015CE0E /* mupen64plus.next.jit.libretro.framework */,57DCE8522E0F97780079E3AA /* yabause.libretro.framework */,57DCE79D2E0C43310079E3AA /* mednafen.saturn.libretro.framework */,57655C1E2DF6B94C003E4A6E /* picodrive.libretro.framework */,57F0D83C2DE2C59900760F57 /* nestopia.libretro.framework */,57BFBE712DD3360A00AABF98 /* ppsspp.libretro.framework */,20B6A88FB41ED3142FD4FD9E /* prboom.libretro.framework */,+ 57909600303D792500A53656 /* gpsp.libretro.framework */,);name = Cores;path = ../Cores;diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected]index f98477f0..17592eab 100644Binary files a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected]index d12d1478..f6cc0908 100644Binary files a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Common/shader_preview.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig b/ManicEmu/ManicEmu/Resources/Config-Base.xcconfigindex fa6e431c..72dc61d4 100644--- a/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig+++ b/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig@@ -11,7 +11,7 @@// https://help.apple.com/xcode/#/dev745c5c974APP_BUNDLE_IDENTIFIER = com.aoshuang.manicemu-APP_BUILD_VERSION = 6+APP_BUILD_VERSION = 7APP_VERSION = 2.0.0// Prebuilt cores under ProjectManicEMU/Cores (Citra.framework, *.libretro.framework, …)diff --git a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.stringsindex 28402667..9367c8ef 100644--- a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings+++ b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings@@ -1042,8 +1042,17 @@ Press the controller button to complete mapping...";"DolphinGameIDMissing" = "Unable to get the current game's GameID, so cheat codes can't be edited.";"BIOSCommondDesc" = "Some specific games may not run properly without a BIOS.";-"WiiKeysBinDesc" = "BootMii keys.bin required to play Wii games";+"WiiKeysBinDesc" = "BootMii format keys.bin is required to play Wii games.";"WiimoteSideways" = "Wiimote Sideways";"WiimoteDesc" = "In the default skin, Wiimote mappings:\n「X」 -> 「1」\n「Y」 -> 「2」\n「ZL」 -> 「Shake」\n「Right Thumbstick」 -> 「Tilt」";"DolphinCoreWraning" = "Due to the current JITless performance limits of the dolphin core, the device may heat up and stutter with frame drops during game emulation, but there are plenty of heroes working hard behind the scenes to optimize things. Everything will gradually get better, right?";"DolphinSaveTips" = "Please use the Files app to open: Manic EMU - dolphin-emu - User to manage your save files on your own.";++"AchievementsSubset" = "Achievement Set";+"AchievementsSelectSubset" = "Select Achievement Set";+"AchievementsBaseSet" = "Base Set";+"AchievementsMultiSetsDesc" = "Multiset lets you earn subset achievements without a patched ROM.";+"AchievementsNoSubset" = "This game has no extra achievement sets. You can enable subsets for this game on retroachievements.org.\n\nGames with Multiset enabled show a \"Subset Configuration\" button next to the set selector. Use it to enable or disable any set for the game.";+"AchievementsMultiSetsGuide" = "This only switches which achievement list is shown. Changing the selected set does not affect earning achievements from any set while you play.";+"GoToSettings" = "Go to Settings";+diff --git a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.stringsindex a01fd65e..aa5f192f 100644--- a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings+++ b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings@@ -976,7 +976,7 @@"ServerSpectateOnlyPasswordDesc" = "客户端以观众身份连接主机时使用的密码。";"StartNetplayHost" = "作为主机开始联机";"StartNetplayHostFailed" = "开启联机失败";-"StopNetplayHost" = "停止主持";+"StopNetplayHost" = "停止主机";"StartNetplayHostDesc" = "以主机(服务器)模式开始联机。";"RefreshNetplayHostList" = "刷新互联网主机";"RefreshNetplayHostListDesc" = "扫描联机主机。";@@ -1037,7 +1037,16 @@"DolphinGameIDMissing" = "无法获取当前游戏的GameID,因此无法编辑作弊码。";"BIOSCommondDesc" = "某些特定游戏在没有 BIOS 的情况下可能无法正常运行";+"WiiKeysBinDesc" = "运行 Wii 游戏需要 BootMii 格式的 keys.bin。";"WiimoteSideways" = "Wiimote 横握";"WiimoteDesc" = "默认皮肤中,Wiimote映射关系:\n「X」 -> 「1」\n「Y」 -> 「2」\n「ZL」 -> 「摇晃」\n「右摇杆」 -> 「倾斜」";"DolphinCoreWraning" = "受限于现阶段 dolphin 核心的 JITless 性能限制,游戏模拟中设备会发烫并卡顿掉帧,但是背后还有众多英雄们在努力优化中,一切都会慢慢变好的,对吧!";"DolphinSaveTips" = "请使用 文件 App, 打开目录: Manic EMU - dolphin-emu - User 自行进行管理存档文件";++"AchievementsSubset" = "成就集";+"AchievementsSelectSubset" = "选择成就集";+"AchievementsBaseSet" = "基础集";+"AchievementsMultiSetsDesc" = "Multiset 可让你无需 ROM 补丁即可获取子集成就。";+"AchievementsNoSubset" = "该游戏暂无额外成就集。你可以在 retroachievements.org 为本游戏启用子集。\n\n已启用 Multiset 的游戏会在集合选择控件旁显示「Subset Configuration」按钮,用于启用或禁用该游戏的任意成就集。";+"AchievementsMultiSetsGuide" = "此处仅用于切换成就列表的显示。切换成就集不会影响游戏运行中对所有成就集的收集。";+"GoToSettings" = "去设置";diff --git a/ManicEmu/ManicEmu/Sources/Base/Constants.swift b/ManicEmu/ManicEmu/Sources/Base/Constants.swiftindex 85c529e9..a16e997d 100644--- a/ManicEmu/ManicEmu/Sources/Base/Constants.swift+++ b/ManicEmu/ManicEmu/Sources/Base/Constants.swift@@ -817,6 +817,9 @@ extension _R {return URL(string: "https://retroachievements.org/user/\(username)")!}static let Retro = URL(string: "https://retroachievements.org")!+ static func RetroGame(gameId: Int) -> URL {+ return Retro.appendingPathComponent("/game/\(gameId)")+ }static let MobyGames = URL(string: "https://www.mobygames.com")!static let InstallSideload = URL(string: "sidestore://source?url=https://apps.manicemu.site/altstore")!static let SideStore = URL(string: "https://sidestore.io")!diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ASListPage.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ASListPage.swiftindex da3fd806..4577bc89 100644--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ASListPage.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ASListPage.swift@@ -282,12 +282,13 @@ extension ASListPage {///icon: 24x24 title: 15 mediumstatic func iconTitleChevronCell(icon: ASIcon? = nil,+ iconSize: CGFloat = R.Size.ButtonExtraExtraSmall,title: String? = nil,titleColor: UIColor = R.Color.LabelPrimary,chevronTitle: String? = nil) -> Self {var styles = [Style]()if let icon {- styles.append(.icon(icon))+ styles.append(.icon(icon, iconSize: iconSize))}if let title {styles.append(.title(.largeText(title, color: titleColor)))diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swiftindex 8b42e7c9..4fb32a9f 100644--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift@@ -23,6 +23,7 @@ enum ExtraKey: String {case gameSortOrdercase achievementsProgresscase alwaysShowProgress+ case cheevosSubsetIdcase tvStandardcase snesVRAMcase airPlayScalingdiff --git a/ManicEmu/ManicEmu/Sources/Business/History/Views/PlayHistoryFavouriteCollectionCell.swift b/ManicEmu/ManicEmu/Sources/Business/History/Views/PlayHistoryFavouriteCollectionCell.swiftindex 2b426e84..3f67ebd8 100644--- a/ManicEmu/ManicEmu/Sources/Business/History/Views/PlayHistoryFavouriteCollectionCell.swift+++ b/ManicEmu/ManicEmu/Sources/Business/History/Views/PlayHistoryFavouriteCollectionCell.swift@@ -21,6 +21,7 @@ class PlayHistoryFavouriteCollectionCell: UICollectionViewCell {imageAndTitlePadding: 4,enableGlass: true)view.enableRoundCorner = true+ view.enablePressEffect = falseview.backgroundColor = R.Color.SideListreturn view}()diff --git a/ManicEmu/ManicEmu/Sources/Business/Import/Views/MultiDiscItemCollectionCell.swift b/ManicEmu/ManicEmu/Sources/Business/Import/Views/MultiDiscItemCollectionCell.swiftindex 65fe5a9b..48d25081 100644--- a/ManicEmu/ManicEmu/Sources/Business/Import/Views/MultiDiscItemCollectionCell.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Import/Views/MultiDiscItemCollectionCell.swift@@ -41,6 +41,7 @@ class MultiDiscItemCollectionCell: UICollectionViewCell {}sortIcon.backgroundColor = .clear+ sortIcon.isFocusable = falseaddSubview(sortIcon)sortIcon.snp.makeConstraints { make inmake.size.equalTo(R.Size.IconSizeMedium)diff --git a/ManicEmu/ManicEmu/Sources/Business/OnlinePlay/Views/LibretroNetplayView.swift b/ManicEmu/ManicEmu/Sources/Business/OnlinePlay/Views/LibretroNetplayView.swiftindex 17410f1d..1f6bb9f2 100644--- a/ManicEmu/ManicEmu/Sources/Business/OnlinePlay/Views/LibretroNetplayView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/OnlinePlay/Views/LibretroNetplayView.swift@@ -456,7 +456,7 @@ class LibretroNetplayView: BaseView {switch runtimeSections[indexPath.section] {case .host:guard let isOn = subActions?.extraValue as? Bool else { return }- toggleHost(isOn: isOn, cellData: cellData, indexPath: indexPath)+ toggleHost(isOn: isOn)case .internet:if indexPath.row == 0 {refreshInternetHosts()@@ -484,28 +484,21 @@ class LibretroNetplayView: BaseView {}}- private func toggleHost(isOn: Bool, cellData: ASListPage.Cell, indexPath: IndexPath) {- if isOn {- UIView.makeLoading()- if LibretroCore.sharedInstance().startNetplayHost(Settings.nickname) {- session.isHosting = true- UIView.hideAllAlert()+ /// ENABLE_HOST needs a live runloop; dismiss first so hideCompletion resumes.+ private func toggleHost(isOn: Bool) {+ UIView.hideAllAlert(completion: {+ if isOn {+ if LibretroCore.sharedInstance().startNetplayHost(Settings.nickname) {+ LibretroNetplaySession.shared.isHosting = true+ } else {+ UIView.makeToast(message: R.string.localizable.startNetplayHostFailed())+ }} else {- UIView.hideLoading()- listView.updateCellData(cellData.updateNormalSwitch(state: .off),- indexPath: indexPath,- reloadView: false)- UIView.makeToast(message: R.string.localizable.startNetplayHostFailed())+ LibretroCore.sharedInstance().stopNetplayHost()+ LibretroNetplaySession.shared.isHosting = false+ UIDevice.generateHaptic()}- } else {- LibretroCore.sharedInstance().stopNetplayHost()- session.isHosting = false- UIDevice.generateHaptic()- listView.updateCellData(cellData.updateNormalSwitch(state: .off),- indexPath: indexPath,- reloadView: false)- reloadList()- }+ })}private func refreshInternetHosts() {@@ -564,15 +557,14 @@ class LibretroNetplayView: BaseView {return}- UIView.makeLoading(timeout: R.Numbers.WebLoadingViewTimeout)- if LibretroCore.sharedInstance().connect(toNetplayHost: host, nickname: Settings.nickname) {- session.connectedHost = host- session.isConnected = true- UIView.hideAllAlert()- } else {- UIView.hideLoading()- UIView.makeToast(message: R.string.localizable.connectNetplayHost())- }+ UIView.hideAllAlert(completion: {+ if LibretroCore.sharedInstance().connect(toNetplayHost: host, nickname: Settings.nickname) {+ LibretroNetplaySession.shared.connectedHost = host+ LibretroNetplaySession.shared.isConnected = true+ } else {+ UIView.makeToast(message: R.string.localizable.connectNetplayHost())+ }+ })}private func disconnect() {diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swiftindex 629b3b76..13afc021 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift@@ -434,7 +434,9 @@ class Game: Object, ObjectUpdatable {} else if gameType == .gba {if defaultCore == 0 {return .mGBA- } else {+ } else if defaultCore == 1 {+ return .VBAM+ } else if defaultCore == 2 {return .VBAM}} else if gameType == .dc {@@ -533,8 +535,10 @@ class Game: Object, ObjectUpdatable {} else if gameType == .gba {if defaultCore == 0 {return Bundle.main.path(forResource: "mgba.libretro", ofType: "framework", inDirectory: "Frameworks")- } else {+ } else if defaultCore == 1 {return Bundle.main.path(forResource: "vbam.libretro", ofType: "framework", inDirectory: "Frameworks")+ } else if defaultCore == 2 {+ return Bundle.main.path(forResource: "gpsp.libretro", ofType: "framework", inDirectory: "Frameworks")}} else if gameType == .dc {if LibretroCore.jitAvailable(), jit {diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swiftindex 83a87b2b..a8c3bff8 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift@@ -720,8 +720,9 @@ class PlayViewController: GameViewController {shortcutsButtonContainer.snp.makeConstraints { make inif manicGame.gameType == .n64 && UIDevice.isPad {make.top.equalTo(gameView.snp.bottom).offset(-9)- } else if manicGame.gameType == .j2me {- make.top.equalTo(gameView.snp.bottom).offset(2)+ } else if manicGame.gameType == .j2me ||+ manicGame.gameType == .gba {+ make.top.equalTo(gameView.snp.bottom).offset(3)} else if manicGame.gameType.usesDOSSkinLayout {if UIDevice.isPad {make.top.equalTo(gameView.snp.bottom).offset(UIDevice.isLandscape ? 30 : 40)@@ -751,7 +752,8 @@ class PlayViewController: GameViewController {if manicGame.gameType == .j2me ||manicGame.gameType.usesDOSSkinLayout ||(manicGame.gameType == .symbian && UIDevice.isPhone) ||- manicGame.gameType == .pce {+ manicGame.gameType == .pce ||+ manicGame.gameType == .gba {make.height.equalTo(R.Size.ItemHeightMicro)} else if manicGame.gameType == .ngp {make.height.equalTo(R.Size.ItemHeightTiny)@@ -2293,6 +2295,7 @@ extension PlayViewController {controllerView.controllerSkin = controllerSkincurrentSkinID = skin.id} else {+ controllerView.controllerSkin = ControllerSkin.standardControllerSkin(for: manicGame.gameType)// Same dual-orientation skin may only be stored under the other orientation key.controllerView.updateControllerSkin()}diff --git a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementListView.swift b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementListView.swiftindex 9c525706..c7ccda28 100644--- a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementListView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementListView.swift@@ -73,47 +73,59 @@ class RetroAchievementListView: BaseView {make.height.equalTo(R.Size.ItemHeightMedium)}- UIView.makeLoading()- CheevosBridge.getCheevosGameInfo(game.romUrl.path) { [weak self] result, cheevosGame in+ let gamePath = game.romUrl.path+ let didShowLoading: Bool+ if let cached = CheevosBridge.cachedGameInfo(forPath: gamePath) {+ cheevosGame = cached+ collectionView.reloadData()+ didShowLoading = false+ } else {+ UIView.makeLoading()+ didShowLoading = true+ }++ CheevosBridge.getCheevosGameInfo(gamePath, reuseInGameClient: PlayViewController.isGaming) { [weak self] result, cheevosGame inguard let self else { return }- UIView.hideLoading()- self.cheevosGame = cheevosGame- self.collectionView.reloadData()- if self.cheevosGame == nil, let blankView = self.collectionView.blankSlateView as? BlankSlateEmptyView {- blankView.label.isHidden = false- if result == GetGameInfoResult.noLoaded {- //游戏不支持RetroAchievements- blankView.label.text = R.string.localizable.achievementsNotSupport(self.game.displayName)- } else if result == GetGameInfoResult.noLogin {- //登录失效- blankView.label.text = R.string.localizable.achievementsLoginFail()- } else if result == GetGameInfoResult.serverError {- //服务器错误- blankView.label.text = R.string.localizable.achievementsServerError()- } else if result == GetGameInfoResult.unknown {- //未知错误- blankView.label.text = R.string.localizable.errorUnknown()- }-- if let _ = AchievementsUser.getUser(),- result != GetGameInfoResult.serverError,- self.game.enableAchievements {- //获取数据失败,但是当前游戏启用了RetroAchievements,对用户进行询问是否需要关闭- UIView.makeAlert(detail: R.string.localizable.achievementsDataLoadFail() + "\n" + R.string.localizable.disableAchievementsAlert(),- confirmTitle: R.string.localizable.confirmTitle(),- confirmAction: {- if PlayViewController.isGaming {- UIView.makeAlert(detail: R.string.localizable.toggleAchievementsAlert(),- confirmTitle: R.string.localizable.confirmTitle(),- confirmAction: {- self.game.enableAchievements = false- NotificationCenter.default.post(name: R.NotificationName.QuitGaming, object: nil)- })- } else {+ if didShowLoading {+ UIView.hideLoading()+ }+ if let cheevosGame {+ self.cheevosGame = cheevosGame+ self.collectionView.reloadData()+ return+ }+ // Keep a stale cache on screen; only show errors when nothing is available.+ guard self.cheevosGame == nil, let blankView = self.collectionView.blankSlateView as? BlankSlateEmptyView else {+ return+ }+ blankView.label.isHidden = false+ if result == GetGameInfoResult.noLoaded {+ blankView.label.text = R.string.localizable.achievementsNotSupport(self.game.displayName)+ } else if result == GetGameInfoResult.noLogin {+ blankView.label.text = R.string.localizable.achievementsLoginFail()+ } else if result == GetGameInfoResult.serverError {+ blankView.label.text = R.string.localizable.achievementsServerError()+ } else if result == GetGameInfoResult.unknown {+ blankView.label.text = R.string.localizable.errorUnknown()+ }++ if let _ = AchievementsUser.getUser(),+ result != GetGameInfoResult.serverError,+ self.game.enableAchievements {+ UIView.makeAlert(detail: R.string.localizable.achievementsDataLoadFail() + "\n" + R.string.localizable.disableAchievementsAlert(),+ confirmTitle: R.string.localizable.confirmTitle(),+ confirmAction: {+ if PlayViewController.isGaming {+ UIView.makeAlert(detail: R.string.localizable.toggleAchievementsAlert(),+ confirmTitle: R.string.localizable.confirmTitle(),+ confirmAction: {self.game.enableAchievements = false- }- })- }+ NotificationCenter.default.post(name: R.NotificationName.QuitGaming, object: nil)+ })+ } else {+ self.game.enableAchievements = false+ }+ })}}}@@ -130,13 +142,10 @@ class RetroAchievementListView: BaseView {private func createLayout() -> UICollectionViewLayout {let layout = UICollectionViewCompositionalLayout { sectionIndex, env in- //item布局let item = NSCollectionLayoutItem(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1),heightDimension: .fractionalHeight(1)))- //group布局- let group = NSCollectionLayoutGroup.horizontal(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(1018)), subitems: [item])+ let group = NSCollectionLayoutGroup.horizontal(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(1098)), subitems: [item])group.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)- //section布局let section = NSCollectionLayoutSection(group: group)section.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)diff --git a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsDetailView.swift b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsDetailView.swiftindex 2b136e9c..4c111a10 100644--- a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsDetailView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsDetailView.swift@@ -39,6 +39,7 @@ class RetroAchievementsDetailView: BaseView {}if let iconSymbol {let iconImageView = SymbolButton(image: UIImage(symbol: iconSymbol, color: .white))+ iconImageView.enablePressEffect = falseiconImageView.enableRoundCorner = trueiconImageView.backgroundColor = UIColor.blackaddSubview(iconImageView)diff --git a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsListCell.swift b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsListCell.swiftindex 132467fc..b83aa389 100644--- a/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsListCell.swift+++ b/ManicEmu/ManicEmu/Sources/Business/RetroAchievements/Views/RetroAchievementsListCell.swift@@ -22,6 +22,7 @@ class RetroAchievementsListCell: UICollectionViewCell {private let missableImageView: SymbolButton = {let view = SymbolButton(image: UIImage(symbol: .exclamationmarkCircle, font: R.Font.Caption(), color: .white))+ view.enablePressEffect = falseview.enableRoundCorner = trueview.backgroundColor = .blackview.isHidden = true@@ -30,6 +31,7 @@ class RetroAchievementsListCell: UICollectionViewCell {private let progressionImageView: SymbolButton = {let view = SymbolButton(image: UIImage(symbol: .clockBadgeCheckmark, font: R.Font.Caption(), color: .white))+ view.enablePressEffect = falseview.enableRoundCorner = trueview.backgroundColor = .blackview.isHidden = true@@ -38,6 +40,7 @@ class RetroAchievementsListCell: UICollectionViewCell {private let winImageView: SymbolButton = {let view = SymbolButton(image: UIImage(symbol: .starCircle, font: R.Font.Caption(), color: .white))+ view.enablePressEffect = falseview.enableRoundCorner = trueview.backgroundColor = .blackview.isHidden = true@@ -179,7 +182,7 @@ class RetroAchievementsListCell: UICollectionViewCell {addSubview(collectionView)collectionView.snp.makeConstraints { make in- make.top.equalTo(segmentView.snp.bottom)+ make.top.equalTo(segmentView.snp.bottom).offset(R.Size.ContentSpaceMedium)make.leading.bottom.trailing.equalToSuperview()}}@@ -198,16 +201,13 @@ class RetroAchievementsListCell: UICollectionViewCell {}let cellSize = (env.container.contentSize.width - R.Size.ContentSpaceHuge*2 - R.Size.ContentSpaceSmall*(column-1))/column- //item布局let item = NSCollectionLayoutItem(layoutSize: NSCollectionLayoutSize(widthDimension: .absolute(cellSize),heightDimension: .absolute(cellSize)))- //group布局let group = NSCollectionLayoutGroup.horizontal(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(cellSize)), subitem: item, count: Int(column))group.interItemSpacing = NSCollectionLayoutSpacing.fixed(R.Size.ContentSpaceSmall)- //section布局let section = NSCollectionLayoutSection(group: group)section.interGroupSpacing = R.Size.ContentSpaceSmall- section.contentInsets = NSDirectionalEdgeInsets(top: 24, leading: 24, bottom: 24, trailing: 24)+ section.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 24, bottom: 24, trailing: 24)return section}return layout@@ -217,7 +217,10 @@ class RetroAchievementsListCell: UICollectionViewCell {func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {let cell = collectionView.dequeueReusableCell(withClass: AchievementsListViewCell.self, for: indexPath)- cell.setData(achievement: datas[indexPath.row], isHardcoreList: isHardcoreList)+ let achievement = datas[indexPath.row]+ cell.setData(achievement: achievement, isHardcoreList: isHardcoreList)+ cell.enablePressEffect = true+ cell.enableFocusEffects = falsereturn cell}@@ -341,7 +344,7 @@ class RetroAchievementsListCell: UICollectionViewCell {let view = AchievementsListView()view.didTapAchievement = { [weak self] achievement inguard let self else { return }- //尝试读取缓存中的解锁进度+ // Prefer cached unlock progress when the live achievement has none.if achievement.measuredProgress == nil,let game = self.game,let achievementProgress = game.getAchievementProgress(id: achievement._id) {@@ -359,7 +362,9 @@ class RetroAchievementsListCell: UICollectionViewCell {view.isFocusable = trueview.onTap { [weak self] inguard let self else { return }- if let username = self.username {+ if let retroGame = self.retroGame {+ UIApplication.shared.open(R.URLs.RetroGame(gameId: retroGame._id))+ } else if let username = self.username {UIApplication.shared.open(R.URLs.RetroProfile(username: username))} else {UIApplication.shared.open(R.URLs.Retro)@@ -371,6 +376,17 @@ class RetroAchievementsListCell: UICollectionViewCell {private var username: String? = nilprivate weak var game: Game? = nil+ private var retroGame: CheevosGame? = nil++ private lazy var subsetItemView: ASListItemView = {+ var styles = [ASListPage.Cell.Style]()+ styles.append(.icon(.symbolImage(R.image.retroachievements_iconSymbols())))+ styles.append(.title(.largeText(R.string.localizable.achievementsSubset())))+ styles.append(.chevron(.init(title: R.string.localizable.achievementsBaseSet())))+ let view = ASListItemView()+ view.styles = styles+ return view+ }()override init(frame: CGRect) {super.init(frame: frame)@@ -587,6 +603,7 @@ class RetroAchievementsListCell: UICollectionViewCell {make.top.equalTo(alwaysShowProgressContainer.snp.bottom).offset(R.Size.ContentSpaceLarge)}let achievementCountIcon = SymbolButton(image: R.image.customTrophyFill()?.applySymbolConfig())+ achievementCountIcon.enablePressEffect = falseachievementInfoContainer.addSubview(achievementCountIcon)achievementCountIcon.snp.makeConstraints { make inmake.size.equalTo(24)@@ -600,6 +617,7 @@ class RetroAchievementsListCell: UICollectionViewCell {make.trailing.equalToSuperview()}let pointIcon = SymbolButton(image: R.image.customFlagPatternCheckered()?.applySymbolConfig())+ pointIcon.enablePressEffect = falseachievementInfoContainer.addSubview(pointIcon)pointIcon.snp.makeConstraints { make inmake.size.equalTo(24)@@ -613,12 +631,36 @@ class RetroAchievementsListCell: UICollectionViewCell {make.trailing.equalToSuperview()}+ let subsetContainer = UIView()+ subsetContainer.enablePressEffect = true+ subsetContainer.isFocusable = true+ subsetContainer.layerCornerRadius = R.Size.CornerRadiusLarge+ subsetContainer.addTapGesture { [weak self] _ in+ self?.handleSubsetTap()+ }+ subsetContainer.onFocusConfirm = { [weak self] in+ self?.handleSubsetTap()+ return true+ }+ subsetContainer.backgroundColor = R.Color.BackgroundSecondary+ addSubview(subsetContainer)+ subsetContainer.snp.makeConstraints { make in+ make.height.equalTo(R.Size.ItemHeightLarge)+ make.leading.trailing.equalToSuperview().inset(R.Size.ContentSpaceMedium)+ make.top.equalTo(achievementInfoContainer.snp.bottom).offset(R.Size.ContentSpaceLarge)+ }+ subsetContainer.addSubview(subsetItemView)+ subsetItemView.snp.makeConstraints { make in+ make.leading.trailing.equalToSuperview().inset(R.Size.ContentSpaceMedium)+ make.top.bottom.equalToSuperview()+ }+let achievementListLabel = UILabel()achievementListLabel.attributedText = NSAttributedString(string: R.string.localizable.achievementsList(), attributes: [.font: R.Font.Footnote(emphasis: true), .foregroundColor: R.Color.LabelSecondary])addSubview(achievementListLabel)achievementListLabel.snp.makeConstraints { make inmake.leading.equalTo(coverImageView)- make.top.equalTo(achievementInfoContainer.snp.bottom).offset(R.Size.ContentSpaceLarge)+ make.top.equalTo(subsetContainer.snp.bottom).offset(R.Size.ContentSpaceLarge)}addSubview(listView)@@ -654,50 +696,10 @@ class RetroAchievementsListCell: UICollectionViewCell {func setDatas(game: Game, retroGame: CheevosGame?) {guard let retroGame else { return }self.game = game+ self.retroGame = retroGamecoverImageView.kf.setImage(with: URL(string: retroGame.badgeUrl), placeholder: UIImage.placeHolder(preferenceSize: .init(80)))- var achievementCount = 0- var hardcoreUnlockCount = 0- var softcoreUnlockCount = 0- var totalPoints = 0- var hardcorePoints = 0- var softcorePoints = 0- var unlockAchievementCount = 0- if let achievements = retroGame.achievements {- var validAchievements = [CheevosAchievement]()- for a in achievements {- if let badgeName = a.badgeName, badgeName == "00000" {- continue- }- validAchievements.append(a)- achievementCount += 1- if a.unlocked {- unlockAchievementCount += 1- }- if a.hardcoreUnlocked {- hardcoreUnlockCount += 1- hardcorePoints += a.points- }- if a.softcoreUnlocked {- softcoreUnlockCount += 1- softcorePoints += a.points- }- totalPoints += a.points- }- let percentage = achievementCount == 0 ? 0.0 : (Double(unlockAchievementCount)/Double(achievementCount)*100)- progressLabel.text = String(format: "%.1f%%", percentage)- progressView.progress = percentage- listView.datas = validAchievements.sorted(by: {- if $0.hardcoreUnlocked {- return true- } else if $1.hardcoreUnlocked {- return false- }- return false- })- }--+ applySelectedSubset()titleLabel.text = retroGame.title ?? game.displayName@@ -707,6 +709,149 @@ class RetroAchievementsListCell: UICollectionViewCell {lastActivityLabel.text = R.string.localizable.readyGameInfoNeverPlayed()}+ enableSwitchButton.setOn(game.enableAchievements, animated: false)++ if retroGame.notSupportHardcore {+ hardcoreSwitchButton.isEnabled = false+ hardcoreSwitchButton.setOn(false, animated: false)+ hardcoreSwitchButton.onDisableTap {+ UIView.makeAlert(detail: R.string.localizable.notSupportHardcore(), cancelTitle: R.string.localizable.gotIt())+ }+ } else {+ hardcoreSwitchButton.isEnabled = true+ hardcoreSwitchButton.setOn(game.enableHarcore, animated: false)+ hardcoreSwitchButton.onDisableTap {}+ }++ alwaysShowProgressButton.setOn(game.getExtraBool(key: ExtraKey.alwaysShowProgress.rawValue) ?? false, animated: false)+ }++ private func currentSubsets() -> [CheevosSubset] {+ retroGame?.subsets ?? []+ }++ private func resolvedSubset() -> CheevosSubset? {+ let subsets = currentSubsets()+ if let savedId = game?.getExtraInt(key: ExtraKey.cheevosSubsetId.rawValue),+ let match = subsets.first(where: { $0._id == savedId }) {+ return match+ }+ return subsets.first(where: { $0.isCore }) ?? subsets.first+ }++ private func subsetDisplayTitle(_ subset: CheevosSubset?) -> String {+ if let title = subset?.title, !title.isEmpty {+ return title+ }+ return R.string.localizable.achievementsBaseSet()+ }++ private func updateSubsetChevronTitle(_ title: String) {+ var styles = subsetItemView.styles+ styles.removeAll(where: {+ if case .chevron = $0 {+ return true+ }+ return false+ })+ styles.append(.chevron(.init(title: title)))+ subsetItemView.styles = styles+ }++ private func handleSubsetTap() {+ let subsets = currentSubsets()+ guard subsets.count > 1 else {+ UIView.makeAlert(title: R.string.localizable.focusShortcutsTips(),+ detail: R.string.localizable.achievementsMultiSetsDesc() + "\n\n" + R.string.localizable.achievementsNoSubset(),+ cancelTitle: R.string.localizable.cancelTitle(),+ confirmTitle: R.string.localizable.goToSettings(),+ confirmAction: { [weak self] in+ guard let self else { return }+ if let retroGame = self.retroGame {+ UIApplication.shared.open(R.URLs.RetroGame(gameId: retroGame._id))+ } else {+ UIApplication.shared.open(R.URLs.Retro)+ }+ })+ return+ }++ let options = subsets.map({+ let icon: ASIcon+ if let urlString = $0.badgeUrl,+ let url = URL(string: urlString) {+ icon = .imageUrl(url, processSize: CGSize(R.Size.ItemHeightTiny),+ cornerStyle: .radius(R.Size.CornerRadiusMicro))+ } else {+ icon = .symbolImage(R.image.retroachievements_iconSymbols())+ }+ return ASListPage.Cell.iconTitleChevronCell(icon: icon,+ iconSize: R.Size.ItemHeightTiny,+ title: subsetDisplayTitle($0))+ })++ ChevronSheetView.show(icon: .symbolImage(R.image.retroachievements_iconSymbols()),+ title: R.string.localizable.achievementsSelectSubset(),+ detail: R.string.localizable.achievementsMultiSetsDesc() + "\n\n" + R.string.localizable.achievementsMultiSetsGuide(),+ cellOptions: options,+ completion: { [weak self] index in+ guard let self, let index, index < subsets.count else { return }+ let subset = subsets[index]+ self.game?.updateExtra(key: ExtraKey.cheevosSubsetId.rawValue, value: subset._id)+ self.applySelectedSubset()+ })+ }++ private func applySelectedSubset() {+ guard let retroGame else { return }+ let subset = resolvedSubset()+ updateSubsetChevronTitle(subsetDisplayTitle(subset))++ let source: [CheevosAchievement]+ if let subset {+ source = (retroGame.achievements ?? []).filter { $0.subsetId == subset._id }+ } else {+ source = retroGame.achievements ?? []+ }++ var achievementCount = 0+ var hardcoreUnlockCount = 0+ var softcoreUnlockCount = 0+ var totalPoints = 0+ var hardcorePoints = 0+ var softcorePoints = 0+ var unlockAchievementCount = 0+ var validAchievements = [CheevosAchievement]()+ for a in source {+ if let badgeName = a.badgeName, badgeName == "00000" {+ continue+ }+ validAchievements.append(a)+ achievementCount += 1+ if a.unlocked {+ unlockAchievementCount += 1+ }+ if a.hardcoreUnlocked {+ hardcoreUnlockCount += 1+ hardcorePoints += a.points+ }+ if a.softcoreUnlocked {+ softcoreUnlockCount += 1+ softcorePoints += a.points+ }+ totalPoints += a.points+ }+ let percentage = achievementCount == 0 ? 0.0 : (Double(unlockAchievementCount) / Double(achievementCount) * 100)+ progressLabel.text = String(format: "%.1f%%", percentage)+ progressView.progress = percentage+ listView.datas = validAchievements.sorted(by: {+ if $0.hardcoreUnlocked {+ return true+ } else if $1.hardcoreUnlocked {+ return false+ }+ return false+ })achievementsCountLabel.attributedText = {let matt = NSMutableAttributedString(string: R.string.localizable.totalAchievements(achievementCount), attributes: [.font: R.Font.Body(emphasis: true), .foregroundColor: R.Color.LabelPrimary])@@ -715,7 +860,7 @@ class RetroAchievementsListCell: UICollectionViewCell {matt.append(NSAttributedString(string: R.string.localizable.softcore() + ": ", attributes: [.font: R.Font.Caption(), .foregroundColor: R.Color.LabelSecondary]))matt.append(NSAttributedString(string: "\(softcoreUnlockCount)", attributes: [.font: R.Font.Body(emphasis: true), .foregroundColor: R.Color.Yellow]))let style = NSMutableParagraphStyle()- style.lineSpacing = R.Size.ContentSpaceTiny/2+ style.lineSpacing = R.Size.ContentSpaceTiny / 2return matt.applying(attributes: [.paragraphStyle: style])}()pointLabel.attributedText = {@@ -725,24 +870,8 @@ class RetroAchievementsListCell: UICollectionViewCell {matt.append(NSAttributedString(string: R.string.localizable.softcore() + ": ", attributes: [.font: R.Font.Caption(), .foregroundColor: R.Color.LabelSecondary]))matt.append(NSAttributedString(string: "\(softcorePoints)", attributes: [.font: R.Font.Body(emphasis: true), .foregroundColor: R.Color.Yellow]))let style = NSMutableParagraphStyle()- style.lineSpacing = R.Size.ContentSpaceTiny/2+ style.lineSpacing = R.Size.ContentSpaceTiny / 2return matt.applying(attributes: [.paragraphStyle: style])}()-- enableSwitchButton.setOn(game.enableAchievements, animated: false)-- if retroGame.notSupportHardcore {- hardcoreSwitchButton.isEnabled = false- hardcoreSwitchButton.setOn(false, animated: false)- hardcoreSwitchButton.onDisableTap {- UIView.makeAlert(detail: R.string.localizable.notSupportHardcore(), cancelTitle: R.string.localizable.gotIt())- }- } else {- hardcoreSwitchButton.isEnabled = true- hardcoreSwitchButton.setOn(game.enableHarcore, animated: false)- hardcoreSwitchButton.onDisableTap {}- }-- alwaysShowProgressButton.setOn(game.getExtraBool(key: ExtraKey.alwaysShowProgress.rawValue) ?? false, animated: false)}}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swiftindex 877190ed..63196590 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift@@ -525,7 +525,7 @@ extension GameType {if self == .ss {return [EmulationCore.BeetleSaturn.name, EmulationCore.Yabause.name]} else if self == .gba {- return [EmulationCore.mGBA.name, EmulationCore.VBAM.name]+ return [EmulationCore.mGBA.name, EmulationCore.VBAM.name, EmulationCore.gpSP.name]} else if self == .md {#if SIDE_LOADreturn [EmulationCore.ClownMDEmu.name, EmulationCore.PicoDrive.name]diff --git a/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusCollectionView.swift b/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusCollectionView.swiftindex c5a0bbd4..e583519c 100644--- a/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusCollectionView.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/FocusKit/FocusCollectionView.swift@@ -447,6 +447,11 @@ private final class FocusCollectionCoordinator: NSObject {let host = hostView(for: element)if let inner = focusedTarget, let host, inner !== host, inner.isDescendant(of: host) {+ // Nested collection cells are also descendants of this cell. Confirm+ // belongs to that inner collection, not the inner-control chain.+ if confirmNestedCollectionItem(inner, owner: collectionView) {+ return true+ }return inner.fk_performPrimaryAction()}@@ -454,15 +459,50 @@ private final class FocusCollectionCoordinator: NSObject {return true}- if case .cell(let indexPath) = element,- let delegate = collectionView.delegate,- delegate.responds(to: #selector(UICollectionViewDelegate.collectionView(_:didSelectItemAt:))) {- delegate.collectionView?(collectionView, didSelectItemAt: indexPath)- return true+ if case .cell(let indexPath) = element {+ return notifyDidSelect(in: collectionView, at: indexPath)+ }+ return false+ }++ /// When focus sits on another collection's cell (not a widget inside it),+ /// run that collection's confirm path: cell `onFocusConfirm`, then `didSelect`.+ private func confirmNestedCollectionItem(_ view: UIView, owner: UICollectionView) -> Bool {+ var current: UIView? = view+ while let candidate = current, candidate !== owner {+ if let cell = candidate as? UICollectionViewCell,+ let nested = owningCollectionView(of: cell),+ nested !== owner {+ guard view === cell else { return false }+ if let onConfirm = cell.onFocusConfirm, onConfirm() {+ return true+ }+ guard let indexPath = nested.indexPath(for: cell) else { return false }+ return notifyDidSelect(in: nested, at: indexPath)+ }+ current = candidate.superview}return false}+ private func owningCollectionView(of cell: UICollectionViewCell) -> UICollectionView? {+ var current: UIView? = cell.superview+ while let view = current {+ if let collectionView = view as? UICollectionView { return collectionView }+ current = view.superview+ }+ return nil+ }++ private func notifyDidSelect(in collectionView: UICollectionView, at indexPath: IndexPath) -> Bool {+ guard let delegate = collectionView.delegate,+ delegate.responds(to: #selector(UICollectionViewDelegate.collectionView(_:didSelectItemAt:))) else {+ return false+ }+ delegate.collectionView?(collectionView, didSelectItemAt: indexPath)+ return true+ }+// MARK: 聚焦private func focus(diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swiftindex db89ae3d..bcbcd955 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulationCore.swift@@ -48,7 +48,8 @@ enum EmulationCore: CaseIterable {BeetlePCE,BeetleNeoPop,VICEx64sc,- PUAE+ PUAE,+ gpSPvar name: String {switch self {@@ -134,6 +135,8 @@ enum EmulationCore: CaseIterable {"VICE x64sc"case .PUAE:"PUAE"+ case .gpSP:+ "gpSP"}}@@ -213,6 +216,8 @@ enum EmulationCore: CaseIterable {return [.c64]case .PUAE:return [.amiga]+ case .gpSP:+ return [.gba]}}@@ -233,9 +238,10 @@ enum EmulationCore: CaseIterable {})}- ///依据 libretro .info 的 savestate_features 判断是否支持 Netplay- ///deterministic(或未声明,默认 deterministic)支持; basic/serialized/禁用存档不支持- ///DOSBox-pure 虽为 serialized, 但实现了 netpacket interface, 可联机+ /// RA netplay: .info `savestate_features` is deterministic (or omitted) *and*+ /// libretro docs do not mark Netplay unsupported. serialized/basic/no-savestate+ /// cores are out, except netpacket cores (DOSBox-pure, melonDS DS, Virtual Jaguar)+ /// and Holani (docs: state-based netplay).var supportNetplay: Bool {guard isLibretroCore else { return false }switch self {@@ -244,17 +250,11 @@ enum EmulationCore: CaseIterable {.PicoDrive,.BeetleSaturn,.BeetleVB,- .PokeMini,- .BeetlePSXHW,- .Gambatte,- .VBAM,- .mGBA,.Gearsystem,.ClownMDEmu,.MAME,.FinalBurnNeo,.Stella,- .PCSXReArmed,.DOSBoxPure,.bsnes,.bsnesJG,@@ -263,7 +263,8 @@ enum EmulationCore: CaseIterable {.Holani,.VirtualJaguar,.BeetlePCE,- .BeetleNeoPop:+ .BeetleNeoPop,+ .gpSP:return truedefault:return falsediff --git a/System.core/GBA.manicskin b/System.core/GBA.manicskinindex d9fbc546..0784d37c 100644--- a/System.core/GBA.manicskin+++ b/System.core/GBA.manicskin@@ -1,3 +1,3 @@version https://git-lfs.github.com/spec/v1-oid sha256:78cf59e6285f367f667ec7fa7377abe540b09ed393072319b1d02cd443f273da-size 717500+oid sha256:b8f1be62d595548811bb76d04bf9022b07f0d293dcda6a0203b0a1ddb3e06fdd+size 1085920diff --git a/System.core/GBA_FLEX.manicskin b/System.core/GBA_FLEX.manicskinindex cd99d3ee..7d4867d7 100644--- a/System.core/GBA_FLEX.manicskin+++ b/System.core/GBA_FLEX.manicskin@@ -1,3 +1,3 @@version https://git-lfs.github.com/spec/v1-oid sha256:944aefe2105330509c77ee6120e8a6ecbd9ba4d29d00c76f889b85d3b59c58ec-size 119654+oid sha256:9a5681b284613f681624238c23e1dfc7a7dfd0bdf37fed427ebcfdab6a87e114+size 129933