Skip to content

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

Fix rotation issues; add Dolphin interpreter selection;

Daiunof653a1c46ad6
diff --git a/Cores/dolphin.libretro.framework/dolphin.libretro b/Cores/dolphin.libretro.framework/dolphin.libretro
index 194ef48c..009d2794 100755
--- a/Cores/dolphin.libretro.framework/dolphin.libretro
+++ b/Cores/dolphin.libretro.framework/dolphin.libretro
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d7333e32c3b492c65ccbc1279550d7b627fd6b7f7c83b926dacb97fedafc2643
-size 15237264
+oid sha256:6bbced29b3682c58fb8c70f39b8f12d70ae735e4965982c5ea07a028b6d90dbd
+size 21951888
diff --git a/Cores/eka2l1.libretro.framework/eka2l1.libretro b/Cores/eka2l1.libretro.framework/eka2l1.libretro
index 326030ba..00b66725 100755
--- a/Cores/eka2l1.libretro.framework/eka2l1.libretro
+++ b/Cores/eka2l1.libretro.framework/eka2l1.libretro
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2009b97015736dd0676ab99eaca564588929b2504adf096a9efb33509f02ea9a
-size 18623552
+oid sha256:24fb3686ae44686f72f0eee47fb002a5cfc70f15b4a4aedb61129db752bfc18d
+size 18639968
diff --git a/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig b/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig
index e80b9305..cf3b7e8e 100644
--- a/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig
+++ b/ManicEmu/ManicEmu/Resources/Config-Base.xcconfig
@@ -11,7 +11,7 @@
// https://help.apple.com/xcode/#/dev745c5c974
APP_BUNDLE_IDENTIFIER = com.aoshuang.manicemu
-APP_BUILD_VERSION = 17
+APP_BUILD_VERSION = 20
APP_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.strings
index 3c0e182b..27210b55 100644
--- a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings
+++ b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings
@@ -1085,3 +1085,6 @@ Press the controller button to complete mapping...";
"CoverScrapingComplete" = "Scraping complete.";
"CoverScrapingStat" = "%@: %d updated, %d skipped, %d failed";
"FetchGamesFromARMSX2" = "Import Games from ARMSX2";
+
+"CPUEmulationMethod" = "CPU Emulation Method";
+"DolphinCPUDesc" = "When JIT is unavailable, the core runs in interpreter mode.\nCached Interpreter: the official interpreter. It is more accurate, but more demanding on performance.\nManic Interpreter: Manic EMU's interpreter. Aggressive optimizations make it faster, but it may also produce more errors.";
diff --git a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
index ab1ff899..3157b54a 100644
--- a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
+++ b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings
@@ -1080,3 +1080,6 @@
"CoverScrapingComplete" = "抓取完成。";
"CoverScrapingStat" = "%@: 已更新 %d,已跳过 %d,失败 %d";
"FetchGamesFromARMSX2" = "从 ARMSX2 导入游戏";
+
+"CPUEmulationMethod" = "CPU 仿真方法";
+"DolphinCPUDesc" = "在无 JIT 的环境中,核心以解释器模式运行。\nCached Interpreter:官方解释器,准确度更高,但对性能要求也更高。\nManic Interpreter:Manic EMU 的解释器,采用更激进的优化,效率更高,但出错也可能更多。";
diff --git a/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift b/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
index 383fefc3..d0a1798e 100644
--- a/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
+++ b/ManicEmu/ManicEmu/Sources/Base/AppDelegate.swift
@@ -37,10 +37,15 @@ extension UIWindow {
}
class AppDelegate: UIResponder, UIApplicationDelegate {
- //支持的旋转方向
+ // Allowed interface orientations. Rotation follows this mask, not overlay windows.
static var orientation: UIInterfaceOrientationMask = R.Config.DefaultOrientation {
didSet {
UIViewController.attemptRotationToDeviceOrientation()
+ if #available(iOS 26.0, *) {
+ let root = ApplicationSceneDelegate.applicationWindow?.rootViewController
+ root?.setNeedsUpdateOfSupportedInterfaceOrientations()
+ root?.setNeedsUpdateOfPrefersInterfaceOrientationLocked()
+ }
}
}
diff --git a/ManicEmu/ManicEmu/Sources/Base/Constants.swift b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
index 33cd1d31..f9c8fc9b 100644
--- a/ManicEmu/ManicEmu/Sources/Base/Constants.swift
+++ b/ManicEmu/ManicEmu/Sources/Base/Constants.swift
@@ -620,6 +620,10 @@ extension _R {
static let SymbianSkinIdentifier = "public.aoshuang.game.symbian.standard"
static let SymbianFlexSkinIdentifier = "public.aoshuang.game.symbian.flex"
static let WiimoteSkinIdentifier = "public.aoshuang.game.wiimote"
+ static let DolphinCPUs = [
+ "Manic Interpreter (experimental)",
+ "Cached Interpreter (slower)"
+ ]
}
enum _Config {
@@ -805,7 +809,15 @@ extension _R {
}
}
static func History(gameType: GameType) -> URL {
- return URL(string: ManicEMU + "History-" + (gameType == .gb ? GameType.gbc.localizedShortName : gameType.localizedShortName))!
+ var gameTypeName = gameType.localizedShortName
+ if gameType == .gb {
+ gameTypeName = GameType.gbc.localizedShortName
+ } else if gameType == .ngpc {
+ gameTypeName = GameType.ngp.localizedShortName
+ } else if gameType == .supergrafx || gameType == .turbografx_16 || gameType == .turbografx_cd {
+ gameTypeName = GameType.pce.localizedShortName
+ }
+ return URL(string: ManicEMU + "History-" + gameTypeName)!
}
static let WFC = URL(string: "https://cdn.altstore.io/file/deltaemulator/delta/wfc-servers.json")!
#if SIDE_LOAD
diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
index bed6f807..6fe64f33 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift
@@ -85,4 +85,5 @@ enum ExtraKey: String {
case ngageFiles
case symbianPackages
case wiiController
+ case dolphinManicInterpreter
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
index 66335b85..490e96b9 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/Models/SpecialCoreOption.swift
@@ -494,12 +494,13 @@ enum SpecialCoreOption: String {
.dolphin_skip_gc_bios: "disabled",
]
} else {
+ let enableManicInterpreter = game.getExtraBool(key: ExtraKey.dolphinManicInterpreter.rawValue) ?? true
let clockRate: String
switch UIDevice.performanceTier {
case .high:
- clockRate = "0.30"
+ clockRate = enableManicInterpreter ? "0.40" : "0.30"
case .ultra:
- clockRate = "0.50"
+ clockRate = enableManicInterpreter ? "0.70" : "0.50"
default:
clockRate = "0.20"
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailView.swift
index 95f13b46..30bda4ff 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailView.swift
@@ -7,35 +7,17 @@
//
class GameInfoDetailView: BaseView {
- lazy var titleTextField: UITextField = {
- let textField = UITextField()
- textField.text = game.displayName
- textField.textColor = R.Color.LabelPrimary
- textField.font = R.Font.Headline(emphasis: true)
- textField.clearButtonMode = .never
- textField.returnKeyType = .done
- textField.onReturnKeyPress { [weak self, weak textField] in
- guard let self = self else { return }
- textField?.resignFirstResponder()
- if let text = textField?.text?.trimmed {
- if text.isEmpty {
- textField?.text = game.displayName
- UIView.makeToast(message: R.string.localizable.readyEditTitleFailed())
- } else if text != game.aliasName {
- Game.change { realm in
- self.game.aliasName = text
- }
- }
- }
- }
- textField.onChange { [weak textField] text in
- if text.count > R.Size.GameNameMaxCount {
- if let markRange = textField?.markedTextRange, let _ = textField?.position(from: markRange.start, offset: 0) { } else {
- textField?.text = String(text.prefix(R.Size.GameNameMaxCount))
- }
- }
- }
- return textField
+ /// Display-only title. Avoid UITextField here: after PlayVC teardown, TextKit2
+ /// UIFieldEditor layout can EXC_BAD_ACCESS when a new text field lays out.
+ private lazy var titleLabel: UILabel = {
+ let label = UILabel()
+ label.text = game.displayName
+ label.textColor = R.Color.LabelPrimary
+ label.font = R.Font.Headline(emphasis: true)
+ label.textAlignment = .center
+ label.lineBreakMode = .byTruncatingTail
+ label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
+ return label
}()
private lazy var editTitleButton: ASButtonView = {
@@ -44,9 +26,7 @@ class GameInfoDetailView: BaseView {
background: .clear))
view.didTapButton = { [weak self] in
guard let self = self else { return }
- if !self.titleTextField.isFirstResponder {
- self.titleTextField.becomeFirstResponder()
- }
+ self.beginRename()
}
return view
}()
@@ -123,15 +103,15 @@ class GameInfoDetailView: BaseView {
make.top.equalToSuperview()
make.width.lessThanOrEqualToSuperview().inset(R.Size.ContentSpaceMedium)
}
- titleContainer.addSubview(titleTextField)
- titleTextField.snp.makeConstraints { make in
+ titleContainer.addSubview(titleLabel)
+ titleLabel.snp.makeConstraints { make in
make.leading.centerY.equalToSuperview()
}
titleContainer.addSubview(editTitleButton)
editTitleButton.snp.makeConstraints { make in
make.size.equalTo(R.Size.IconSizeMedium)
make.top.trailing.bottom.equalToSuperview()
- make.leading.equalTo(titleTextField.snp.trailing).offset(R.Size.ContentSpaceTiny)
+ make.leading.equalTo(titleLabel.snp.trailing).offset(R.Size.ContentSpaceTiny)
}
let subtitleContainer = UIView()
@@ -174,4 +154,25 @@ class GameInfoDetailView: BaseView {
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
+
+ /// Present rename UI. Prefer a separate alert over inline UITextField (shared UIFieldEditor / TextKit2 crash after Play).
+ func beginRename() {
+ LimitedTextInputView.show(icon: .symbolImage(R.image.renameRegular_iconSymbols()),
+ title: R.string.localizable.gamesRename(),
+ text: game.displayName,
+ limitedType: .normal(maxTextSize: R.Size.GameNameMaxCount),
+ confirmAction: { [weak self] result in
+ guard let self, let text = (result as? String)?.trimmed else { return }
+ if text.isEmpty {
+ UIView.makeToast(message: R.string.localizable.readyEditTitleFailed())
+ return
+ }
+ if text != self.game.aliasName {
+ Game.change { _ in
+ self.game.aliasName = text
+ }
+ self.titleLabel.text = text
+ }
+ })
+ }
}
diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoView.swift
index 21b1bc49..a991d688 100644
--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoView.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoView.swift
@@ -70,10 +70,6 @@ class GameInfoView: BaseView {
}
view.didScroll = { [weak self] scrollView in
guard let self else { return }
- if self.gameInfoDetailView.titleTextField.isFirstResponder {
- self.gameInfoDetailView.titleTextField.resignFirstResponder()
- }
-
guard !UIDevice.isLandscape else { return }
let contentOffsetY = scrollView.contentOffset.y + scrollView.adjustedContentInset.top
//Make the gameInfoDetailView pin to the top of the gameOptionView content.
@@ -194,7 +190,7 @@ class GameInfoView: BaseView {
DispatchQueue.main.asyncAfter(delay: 0.35, execute: { [weak self] in
if readyAction == .rename {
- self?.gameInfoDetailView.titleTextField.becomeFirstResponder()
+ self?.gameInfoDetailView.beginRename()
}
})
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
index 3014c85c..734ebaf1 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOption.swift
@@ -79,7 +79,8 @@ enum GameOption: Int, CaseIterable {
netplay,
symbianDevice,
wiiControllerMode,
- coverScraping
+ coverScraping,
+ dolphinCpuCore
//When adding a new option, make sure to add it at the end; otherwise, it might affect the existing Prefference configurations
@@ -137,7 +138,7 @@ enum GameOption: Int, CaseIterable {
.symbolImage(R.image.advance_shader_iconSymbols())
case .pspTexture:
.symbolImage(R.image.texture_iconSymbols())
- case .ps1Bios:
+ case .ps1Bios, .dolphinCpuCore:
.symbolImage(R.image.bios_iconSymbols())
case .ps1ControllerMode, .wiiControllerMode:
.symbolImage(R.image.controller_iconSymbols())
@@ -368,6 +369,8 @@ enum GameOption: Int, CaseIterable {
R.string.localizable.symbianFirmwareChoosing()
case .coverScraping:
R.string.localizable.coverScraping()
+ case .dolphinCpuCore:
+ R.string.localizable.cpuEmulationMethod()
}
}
@@ -493,6 +496,7 @@ enum GameOption: Int, CaseIterable {
.symbianDevice,
.wiiControllerMode,
.coreSettings,
+ .dolphinCpuCore,
],
[
.saveState,
@@ -923,6 +927,15 @@ enum GameOption: Int, CaseIterable {
}) {
return .chevron(R.Strings.WiiControllers[firstGameValue])
}
+
+ case .dolphinCpuCore:
+ let extraKey = ExtraKey.dolphinManicInterpreter.rawValue
+ let firstGameValue = firstGame.getExtraBool(key: extraKey) ?? true
+ if games.allSatisfy({
+ ($0.getExtraBool(key: extraKey) ?? true) == firstGameValue
+ }) {
+ return .chevron(R.Strings.DolphinCPUs[firstGameValue ? 0 : 1])
+ }
case .rename,
.cover,
@@ -1005,7 +1018,8 @@ enum GameOption: Int, CaseIterable {
.clownMDTvStandard,
.snesVRAM,
.symbianDevice,
- .coverScraping
+ .coverScraping,
+ .dolphinCpuCore
]
}
}
@@ -1240,6 +1254,10 @@ enum GameOption: Int, CaseIterable {
allOptions.remove(.wiiControllerMode)
}
+ if !game.isDolphinCore || game.jit {
+ allOptions.remove(.dolphinCpuCore)
+ }
+
allOptions.subtract(disableOptionsForScene(scene))
return Array(allOptions)
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
index f350b229..bd538553 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Models/GameOptionPerform.swift
@@ -370,7 +370,9 @@ extension GameOption {
case .jit:
- performSwitchAction(with: games, accessoryChange: accessoryChange)
+ performSwitchAction(with: games,
+ accessoryChange: accessoryChange,
+ reloadAll: reloadAll)
case .citraAdvanceToggle:
Settings.change { realm in
@@ -1073,10 +1075,16 @@ extension GameOption {
case .coverScraping:
GameCoverScrapingView.show(games: games)
+
+ case .dolphinCpuCore:
+ performStringAction(with: games, accessoryChange: accessoryChange)
+
}
}
- private func performSwitchAction(with games: [Game], accessoryChange: (() -> Void)? = nil) {
+ private func performSwitchAction(with games: [Game],
+ accessoryChange: (() -> Void)? = nil,
+ reloadAll: (() -> Void)? = nil) {
guard let firstGame = games.first else { return }
var firstGameTimeConsumingValue: Bool? = nil
@@ -1093,6 +1101,9 @@ extension GameOption {
if games.count == 1 {
if self == .jit {
Game.change(action: { _ in firstGame.jit.toggle() })
+ if firstGame.isDolphinCore {
+ reloadAll?()
+ }
} else if self == .citraShader {
Game.change(action: { _ in firstGame.accurateShaders.toggle() })
hideSheetInGaming()
@@ -1212,6 +1223,9 @@ extension GameOption {
}
}
accessoryChange?()
+ if games.allSatisfy({ $0.isDolphinCore }) {
+ reloadAll?()
+ }
}
})
}
@@ -1312,6 +1326,9 @@ extension GameOption {
} else if self == .wiiControllerMode {
options = R.Strings.WiiControllers
detail = R.string.localizable.wiimoteDesc()
+ } else if self == .dolphinCpuCore {
+ options = R.Strings.DolphinCPUs
+ detail = R.string.localizable.dolphinCPUDesc()
}
guard options.count > 0 else { return }
@@ -1525,6 +1542,10 @@ extension GameOption {
WiiEmulatorBridge.shared.controllerType = controllerType
resumeEmulationIfNeed()
}
+ } else if self == .dolphinCpuCore {
+ games.forEach({
+ $0.updateExtra(key: ExtraKey.dolphinManicInterpreter.rawValue, value: index == 0)
+ })
}
accessoryChange?()
} else {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/ViewControllers/GamesViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Games/ViewControllers/GamesViewController.swift
index a7a95e9c..9aed39c2 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Games/ViewControllers/GamesViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Games/ViewControllers/GamesViewController.swift
@@ -225,8 +225,11 @@ class GamesViewController: BaseViewController {
game.handleTapAction(forceQuick: true)
})
} else {
- self.hideSideMenu()
- GameInfoView.show(readyAction: .default, game: game)
+ // Wait for side menu dismiss before presenting GameInfo; overlapping
+ // presentation can trigger UITextField/UIFieldEditor layout crashes.
+ self.hideSideMenu(completion: {
+ GameInfoView.show(readyAction: .default, game: game)
+ })
}
}
containerVC.view.addSubview(view)
diff --git a/ManicEmu/ManicEmu/Sources/Business/Home/ViewControllers/HomeViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Home/ViewControllers/HomeViewController.swift
index 012751c7..05b604c5 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Home/ViewControllers/HomeViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Home/ViewControllers/HomeViewController.swift
@@ -162,6 +162,11 @@ class HomeViewController: BaseViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
landscapeBackgroundView.setHomeVisible(true)
+ if let coordinator = transitionCoordinator {
+ let size = R.Size.WindowSize
+ viewWillTransition(to: size, with: coordinator)
+ childControllers.forEach { $0.viewWillTransition(to: size, with: coordinator) }
+ }
}
override func viewDidAppear(_ animated: Bool) {
diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
index cdbda3be..77b31c3e 100644
--- a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
+++ b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift
@@ -806,6 +806,9 @@ class PlayViewController: GameViewController {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
resetOrientationConfig()
+ if manicGame.safeMode {
+ manicGame.safeMode = false
+ }
}
override func viewDidDisappear(_ animated: Bool) {
@@ -893,12 +896,6 @@ class PlayViewController: GameViewController {
return super.preferredInterfaceOrientationForPresentation
}
- /// iOS 26: keep the scene on the forced interface orientation even if the device is still held in portrait.
- @available(iOS 26.0, *)
- override var prefersInterfaceOrientationLocked: Bool {
- manicGame.orientation != .auto
- }
-
override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) {
let fromSize = R.Size.WindowSize
let toSize = size
@@ -2147,13 +2144,17 @@ extension PlayViewController {
])
LibretroCore.sharedInstance().setLibretroLogMonitor(true)
} else if manicGame.isDolphinCore {
+ var enableManicInterpreter = true
let enableJIT = LibretroCore.jitAvailable() && manicGame.jit
if enableJIT {
setupUniversalScript(gameType: manicGame.gameType)
+ } else {
+ enableManicInterpreter = manicGame.getExtraBool(key: ExtraKey.dolphinManicInterpreter.rawValue) ?? true
}
- //4: JITARM64 5: Cached Interpreter
+ //4: JITARM64 5: Cached Interpreter 6: Manic Interpreter
+
updateLibretroCoreConfigs(core: .Dolphin, configs: [
- .dolphin_cpu_core: enableJIT ? "4" : "5",
+ .dolphin_cpu_core: enableJIT ? "4" : (enableManicInterpreter ? "6" : "5"),
.dolphin_cheats_enabled: isHardcoreMode ? "disabled" : "enabled"
])
} else if manicGame.gameType == .amiga {
@@ -2445,7 +2446,7 @@ extension PlayViewController {
}
}
- /// Apply the in-game orientation lock to AppDelegate / iOS 26 scene lock.
+ /// Apply the in-game orientation lock via AppDelegate.orientation.
private func setOrientationConfig() {
AppDelegate.orientation = {
if manicGame.orientation == .landscape {
@@ -2456,17 +2457,11 @@ extension PlayViewController {
return R.Config.DefaultOrientation
}
}()
- if #available(iOS 26.0, *) {
- setNeedsUpdateOfPrefersInterfaceOrientationLocked()
- }
}
/// Restore the app-wide default orientation mask.
private func resetOrientationConfig() {
AppDelegate.orientation = R.Config.DefaultOrientation
- if #available(iOS 26.0, *) {
- setNeedsUpdateOfPrefersInterfaceOrientationLocked()
- }
}
/// Pin the allowed mask to the current interface orientation (not the physical device).
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/CGSizeExtenstions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/CGSizeExtenstions.swift
index e249bcd8..a4ad8099 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/CGSizeExtenstions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/CGSizeExtenstions.swift
@@ -19,4 +19,8 @@ extension CGSize {
func scaleBy(_ scale: CGFloat) -> CGSize {
return CGSize(width: width * scale, height: height * scale)
}
+
+ var swapSide: CGSize {
+ return CGSize(width: height, height: width)
+ }
}
diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
index a755164c..ae1ba8e7 100644
--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift
@@ -12,7 +12,7 @@ import RealmSwift
///通过文件名后缀生成GameType
extension GameType {
- static var multiPlatformFileExtensions = ["chd", "iso", "bin", "cue", "m3u", "pbp", "ccd", "zip", "7z", "elf", "dol", "rvz", "wad"]
+ static var multiPlatformFileExtensions = ["chd", "iso", "bin", "cue", "m3u", "pbp", "ccd", "zip", "7z", "elf", "dol", "rvz", "wad", "prg"]
static func gameTypes(multiPlatformFileExtension: String) -> [GameType] {
let ext = multiPlatformFileExtension.lowercased()
@@ -44,6 +44,8 @@ extension GameType {
return [.ngc, .wii]
case "wad":
return [.doom, .wii]
+ case "prg":
+ return [.c64, .jaguar]
default:
return []
}