Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.
Swift apple-silicond3dmetaldxmtdxvkfexgame-porting-toolkitgamingmac-gamingmacosmetalmoltenvksteamswiftuivkd3d-protonwhisky-alternativewindows-gameswinewine-wrapper
The frame rate cap reaches games in Apple's DirectX 12 mode
Gauthier Piarrettedacb6f05c03c
diff --git a/Sources/HighballKit/Bottle.swift b/Sources/HighballKit/Bottle.swiftindex c226923..8ab4879 100644--- a/Sources/HighballKit/Bottle.swift+++ b/Sources/HighballKit/Bottle.swift@@ -714,7 +714,12 @@ public struct Bottle: Sendable {switch r {case .dxvk: env["DXVK_FRAME_RATE"] = String(settings.fpsCap)case .vkd3d: env["DXVK_FRAME_RATE"] = String(settings.fpsCap); env["VKD3D_FRAME_RATE"] = String(settings.fpsCap)- case .dxmt, .d3dmetal: env["DXMT_CONFIG"] = "d3d11.preferredMaxFrameRate=\(settings.fpsCap);" // 32-bit titles on d3dmetal run on dxmt+ case .dxmt: env["DXMT_CONFIG"] = "d3d11.preferredMaxFrameRate=\(settings.fpsCap);"+ case .d3dmetal:+ env["DXMT_CONFIG"] = "d3d11.preferredMaxFrameRate=\(settings.fpsCap);" // 32-bit titles on d3dmetal run on dxmt+ // D3DMetal reads its own cap (D3DMetal 4, the GPTK 4 engines; earlier builds ignore+ // it). Without it the cap never reached a 64-bit game in this mode.+ env["D3DM_MAX_FPS"] = String(settings.fpsCap)default: break}}diff --git a/Tests/HighballKitTests/EnvironmentTests.swift b/Tests/HighballKitTests/EnvironmentTests.swiftindex 185c51c..9f83abe 100644--- a/Tests/HighballKitTests/EnvironmentTests.swift+++ b/Tests/HighballKitTests/EnvironmentTests.swift@@ -265,6 +265,7 @@ final class EnvironmentTests: XCTestCase {bottle.settings.fpsCap = 45let env = try bottle.environment(engine: engine, renderer: .d3dmetal)XCTAssertEqual(env["DXMT_CONFIG"], "d3d11.preferredMaxFrameRate=45;")+ XCTAssertEqual(env["D3DM_MAX_FPS"], "45", "the 64-bit games D3DMetal serves get its own cap")XCTAssertNil(env["DXVK_FRAME_RATE"], "d3dmetal has no dxvk cap channel")}}