Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

pickers: Apple's DirectX 12 support is listed before its licence is accepted; Play asks for it (highball#138)

Gauthier Piarrette294987ed4cc6
diff --git a/Sources/HighballApp/GameDetailView.swift b/Sources/HighballApp/GameDetailView.swift
index a26ceb6..29c7a23 100644
--- a/Sources/HighballApp/GameDetailView.swift
+++ b/Sources/HighballApp/GameDetailView.swift
@@ -219,7 +219,9 @@ struct GameDetailView: View {
get: { state.rendererOverride(for: item)?.rawValue ?? "" },
set: { state.setRendererOverride(Renderer(rawValue: $0), for: item.id) })) {
Text(L("Environment's mode")).tag("")
- ForEach(Renderer.allCases.filter { $0.availability(in: engine) == .available }, id: \.self) { r in
+ // Shipped modes, licence accepted or not: a pick that still
+ // needs Apple's licence is asked for at Play (highball#138).
+ ForEach(Renderer.allCases.filter { $0.availability(in: engine) != .notShipped }, id: \.self) { r in
Text(GamePageCopy.plainName(r)).tag(r.rawValue)
}
}.labelsHidden().frame(maxWidth: 360)
diff --git a/Sources/HighballApp/GraphicsModePicker.swift b/Sources/HighballApp/GraphicsModePicker.swift
index 3df069d..f310ea2 100644
--- a/Sources/HighballApp/GraphicsModePicker.swift
+++ b/Sources/HighballApp/GraphicsModePicker.swift
@@ -9,7 +9,10 @@ struct GraphicsModePicker: View {
let bottle: Bottle
private var live: Bottle { state.bottles.first { $0.name == bottle.name } ?? bottle }
- private var d3dmetalAvailable: Bool { state.engine(for: live)?.rendererDir("d3dmetal") != nil }
+ // Listed when the engine ships it, licence accepted or not: picking it with the licence
+ // still to accept makes the next Play ask for it, in context (highball#138: the option
+ // was hidden until then and the reporter could not find it).
+ private var d3dmetalAvailable: Bool { state.engine(for: live).map { Renderer.d3dmetal.availability(in: $0) != .notShipped } ?? false }
private var vkd3dAvailable: Bool { state.engine(for: live)?.rendererDir("vkd3d") != nil }
/// nil = Automatic.