This commit is contained in:
Stossy11 2025-01-19 04:56:54 +11:00
parent 27aaea0d68
commit 1c6c083163
10 changed files with 43 additions and 22 deletions

View File

@ -15,7 +15,7 @@ namespace ARMeilleure.Translation.Cache
static partial class JitCache static partial class JitCache
{ {
private static readonly int _pageSize = (int)MemoryBlock.GetPageSize(); private static readonly int _pageSize = (int)MemoryBlock.GetPageSize();
private static readonly int _pageMask = _pageSize - 2; private static readonly int _pageMask = _pageSize - 8;
private const int CodeAlignment = 4; // Bytes. private const int CodeAlignment = 4; // Bytes.
private const int CacheSize = 2047 * 1024 * 1024; private const int CacheSize = 2047 * 1024 * 1024;

View File

@ -90,6 +90,9 @@
5650564D2D2A75B300C8BB1E /* PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet */ = { 5650564D2D2A75B300C8BB1E /* PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet */ = {
isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet; isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
attributesByRelativePath = { attributesByRelativePath = {
"Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib" = (
CodeSignOnCopy,
);
"Dependencies/Dynamic Libraries/SoftwareKeyboard.framework" = ( "Dependencies/Dynamic Libraries/SoftwareKeyboard.framework" = (
CodeSignOnCopy, CodeSignOnCopy,
RemoveHeadersOnCopy, RemoveHeadersOnCopy,
@ -149,6 +152,7 @@
"Dependencies/Dynamic Libraries/libavcodec.dylib", "Dependencies/Dynamic Libraries/libavcodec.dylib",
"Dependencies/Dynamic Libraries/libavutil.dylib", "Dependencies/Dynamic Libraries/libavutil.dylib",
"Dependencies/Dynamic Libraries/libMoltenVK.dylib", "Dependencies/Dynamic Libraries/libMoltenVK.dylib",
"Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib",
"Dependencies/Dynamic Libraries/SoftwareKeyboard.framework", "Dependencies/Dynamic Libraries/SoftwareKeyboard.framework",
Dependencies/XCFrameworks/libavcodec.xcframework, Dependencies/XCFrameworks/libavcodec.xcframework,
Dependencies/XCFrameworks/libavfilter.xcframework, Dependencies/XCFrameworks/libavfilter.xcframework,

View File

@ -36,5 +36,21 @@
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "7E7EAEC7-2878-43F7-8791-DED96ED532ED"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MeloNX/App/Views/ContentView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "264"
endingLineNumber = "264"
landmarkName = "start(displayid:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints> </Breakpoints>
</Bucket> </Bucket>

View File

@ -12,12 +12,12 @@
<key>Ryujinx.xcscheme_^#shared#^_</key> <key>Ryujinx.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>2</integer> <integer>1</integer>
</dict> </dict>
<key>com.Stossy11.MeloNX.RyujinxAg.xcscheme_^#shared#^_</key> <key>com.Stossy11.MeloNX.RyujinxAg.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>1</integer> <integer>2</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>

View File

@ -97,7 +97,7 @@ class Ryujinx {
isRunning = true isRunning = true
RunLoop.current.perform { DispatchQueue.main.async {
let url = URL(string: config.gamepath)! let url = URL(string: config.gamepath)!
do { do {
@ -152,10 +152,11 @@ class Ryujinx {
args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode]) args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode])
args.append(contentsOf: ["--exclusive-fullscreen", String(true)]) // args.append(contentsOf: ["--exclusive-fullscreen", String(true)])
args.append(contentsOf: ["--exclusive-fullscreen-width", "\(Int(UIScreen.main.bounds.width))"]) // args.append(contentsOf: ["--exclusive-fullscreen-width", "\(Int(UIScreen.main.bounds.width))"])
args.append(contentsOf: ["--exclusive-fullscreen-height", "\(Int(UIScreen.main.bounds.height))"]) // args.append(contentsOf: ["--exclusive-fullscreen-height", "\(Int(UIScreen.main.bounds.height))"])
// We don't need this. Ryujinx should handle it fine :3 // We don't need this. Ryujinx should handle it fine :3
// this also causes crashes in some games :3
if config.fullscreen { if config.fullscreen {
args.append(contentsOf: ["--aspect-ratio", "Stretched"]) args.append(contentsOf: ["--aspect-ratio", "Stretched"])
@ -167,7 +168,7 @@ class Ryujinx {
} }
args.append("--disable-vsync") // args.append("--disable-vsync")
if config.resscale != 1.0 { if config.resscale != 1.0 {

View File

@ -48,8 +48,11 @@ struct ContentView: View {
_config = State(initialValue: defaultConfig) _config = State(initialValue: defaultConfig)
let defaultSettings: [MoltenVKSettings] = [ let defaultSettings: [MoltenVKSettings] = [
MoltenVKSettings(string: "MVK_CONFIG_USE_METAL_PRIVATE_API", value: "1"), // MoltenVKSettings(string: "MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS", value: "1"),
MoltenVKSettings(string: "MVK_CONFIG_RESUME_LOST_DEVICE", value: "1") // MoltenVKSettings(string: "MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS", value: "2"),
// MoltenVKSettings(string: "MVK_USE_METAL_PRIVATE_API", value: "0"),
// MoltenVKSettings(string: "MVK_CONFIG_RESUME_LOST_DEVICE", value: "1"),
// MoltenVKSettings(string: "MVK_CONFIG_USE_METAL_PRIVATE_API", value: "0")
] ]
_settings = State(initialValue: defaultSettings) _settings = State(initialValue: defaultSettings)
@ -61,7 +64,7 @@ struct ContentView: View {
// MARK: - Body // MARK: - Body
var body: some View { var body: some View {
if let game, quits == false { if game != nil, quits == false {
if isLoading { if isLoading {
emulationView emulationView
.onAppear() { .onAppear() {
@ -80,7 +83,7 @@ struct ContentView: View {
} }
.onAppear() { .onAppear() {
isAnimating = false isAnimating = false
} }
} }
} else { } else {
@ -259,15 +262,11 @@ struct ContentView: View {
config.gamepath = game.fileURL.path config.gamepath = game.fileURL.path
config.inputids = Array(Set(currentControllers.map(\.id))) config.inputids = Array(Set(currentControllers.map(\.id)))
var setting: MoltenVKSettings
if game.titleName.lowercased() != "super mario odyssey" { if game.titleName.lowercased() == "super mario odyssey" {
setting = (MoltenVKSettings(string: "MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS", value: "0")) let setting = MoltenVKSettings(string: "MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS", value: "1")
} else { setenv(setting.string, setting.value, 1)
setting = (MoltenVKSettings(string: "MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS", value: "1"))
} }
setenv(setting.string, setting.value, 1)
if config.inputids.isEmpty { if config.inputids.isEmpty {

View File

@ -39,6 +39,7 @@ struct SettingsView: View {
return memoryManagerModes.filter { $0.1.localizedCaseInsensitiveContains(searchText) } return memoryManagerModes.filter { $0.1.localizedCaseInsensitiveContains(searchText) }
} }
var body: some View { var body: some View {
iOSNav { iOSNav {
List { List {
@ -65,6 +66,8 @@ struct SettingsView: View {
labelWithIcon("Docked Mode", iconName: "dock.rectangle") labelWithIcon("Docked Mode", iconName: "dock.rectangle")
} }
.tint(.blue) .tint(.blue)
VStack(alignment: .leading, spacing: 10) { VStack(alignment: .leading, spacing: 10) {
HStack { HStack {

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.developer.kernel.extended-virtual-addressing</key>
<true/>
<key>com.apple.developer.kernel.increased-memory-limit</key> <key>com.apple.developer.kernel.increased-memory-limit</key>
<true/> <true/>
</dict> </dict>

View File

@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.Vulkan.MoltenVK
config.UseMetalArgumentBuffers = true; config.UseMetalArgumentBuffers = true;
config.SemaphoreSupportStyle = MVKVkSemaphoreSupportStyle.MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE_SINGLE_QUEUE; config.SemaphoreSupportStyle = MVKVkSemaphoreSupportStyle.MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE_SINGLE_QUEUE;
// config.SynchronousQueueSubmits = false; config.SynchronousQueueSubmits = false;
config.ResumeLostDevice = true; config.ResumeLostDevice = true;