Skip to content

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

Retina resolution at 100% scaling, for games that scale their own interface

Gauthier Piarrettece3b0bda4655
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swift
index e87ead8..35f3e3f 100644
--- a/Sources/HighballApp/AppState.swift
+++ b/Sources/HighballApp/AppState.swift
@@ -2219,13 +2219,15 @@ final class AppState {
return target
}
- func setDpi(_ scale: Int, in bottle: Bottle) {
+ func setDpi(_ scale: Int, retinaAt100: Bool? = nil, in bottle: Bottle) {
guard let engine = engine(for: bottle) else { return }
var copy = bottle
copy.settings.dpiScale = scale
+ if let retinaAt100 { copy.settings.retinaAt100 = retinaAt100 }
update(copy)
+ let retina = copy.settings.retinaAt100
runBusy("Applying display scaling", showLogSheet: false) { [self] in
- try await WineRunner(paths: paths, engine: engine, bottle: copy).setDpi(logPixels: scale)
+ try await WineRunner(paths: paths, engine: engine, bottle: copy).setDpi(logPixels: scale, retinaAt100: retina)
}
}
diff --git a/Sources/HighballApp/BottleView.swift b/Sources/HighballApp/BottleView.swift
index a261469..c15d2ce 100644
--- a/Sources/HighballApp/BottleView.swift
+++ b/Sources/HighballApp/BottleView.swift
@@ -435,6 +435,14 @@ struct BottleSettingsSheet: View {
}
Text(L("Scales the Windows desktop and UI, 100% to 250%. Launchers and desktop apps follow it; many full-screen games set their own resolution and won't. Above 100% uses native Retina pixels, so heavy games may run slower."))
.font(.caption).foregroundStyle(.secondary)
+ // Above 100% Retina pixels are always on, so the choice only exists at 100%.
+ if Int((dpiDraft ?? Double(currentDpi)).rounded()) <= 96 {
+ Toggle(L("Retina resolution at 100%"), isOn: Binding(
+ get: { liveBottle.settings.retinaAt100 },
+ set: { state.setDpi(currentDpi, retinaAt100: $0, in: liveBottle) }))
+ Text(L("For a game whose own interface grows with the scaling. Games get the display's full pixel count with nothing scaled up, while Windows apps like Steam draw at half size."))
+ .font(.caption).foregroundStyle(.secondary)
+ }
}
Section(L("Compatibility")) {
Picker(L("Synchronization"), selection: binding(\.sync)) {
diff --git a/Sources/HighballApp/L10n.swift b/Sources/HighballApp/L10n.swift
index 8fddf9c..8be7a43 100644
--- a/Sources/HighballApp/L10n.swift
+++ b/Sources/HighballApp/L10n.swift
@@ -90,6 +90,9 @@ enum L10n {
"Scales the Windows desktop and UI, 100% to 250%. Launchers and desktop apps follow it; many full-screen games set their own resolution and won't. Above 100% uses native Retina pixels, so heavy games may run slower.":
"Met à l'échelle le bureau et l'interface Windows, de 100 % à 250 %. Les lanceurs et applications de bureau la suivent ; beaucoup de jeux en plein écran définissent leur propre résolution et l'ignorent. Au-delà de 100 %, le rendu utilise les pixels Retina natifs, donc les jeux exigeants peuvent ralentir.",
"Applying display scaling": "Application de la mise à l'échelle",
+ "Retina resolution at 100%": "Résolution Retina à 100 %",
+ "For a game whose own interface grows with the scaling. Games get the display's full pixel count with nothing scaled up, while Windows apps like Steam draw at half size.":
+ "Pour un jeu dont l'interface grossit avec la mise à l'échelle. Les jeux reçoivent tous les pixels de l'écran sans agrandissement, et les applications Windows comme Steam s'affichent deux fois plus petites.",
"Flaky": "Instable",
"Known issues: ": "Problèmes connus : ",
"Report a Problem…": "Signaler un problème…",
diff --git a/Sources/HighballKit/Bottle.swift b/Sources/HighballKit/Bottle.swift
index 86bde40..45227a5 100644
--- a/Sources/HighballKit/Bottle.swift
+++ b/Sources/HighballKit/Bottle.swift
@@ -361,6 +361,11 @@ public struct BottleSettings: Codable, Sendable {
/// Mac driver switches to native Retina pixels so the scaled UI stays crisp. Applied to the prefix
/// registry on change. Supersedes the old on/off retinaMode (which was just 96 / 192).
public var dpiScale: Int = 96
+ /// Native Retina pixels at 100% as well. Above 100% they are always on; at 100% they are off
+ /// unless this is set, because every Windows app then draws at half size. A game whose own
+ /// interface grows with the Windows scaling wants exactly that: the display's full pixel count
+ /// with nothing scaled up (a player at 2294x1490 found even 125% too big, 2026-09-29).
+ public var retinaAt100: Bool = false
/// Extra WINEDLLOVERRIDES entries, e.g. "version=n,b" for Cyber Engine Tweaks. Appended to
/// whatever the renderer sets, semicolon separated.
public var dllOverrides: String = ""
@@ -393,7 +398,7 @@ public struct BottleSettings: Codable, Sendable {
public var recipes: [String] = []
public var created: Date = Date()
- enum CodingKeys: String, CodingKey { case formatVersion, name, engineID, renderer, rendererExplicit, windowsVersion, sync, metalHUD, advertiseAVX, dxvkAsync, fpsCap, frameGen, frameGenAdaptive, frameGenFlowScale, frameGenPerformance, frameGenForceVsync, commandIsControl, commandIsControlSynced, dpiScale, dllOverrides, dxvkAppConfig, dllOverridesSynced, engineAppDefaultsSynced, keepFilesInside, environment, gameEnvironment, pins, recipes, created }
+ enum CodingKeys: String, CodingKey { case formatVersion, name, engineID, renderer, rendererExplicit, windowsVersion, sync, metalHUD, advertiseAVX, dxvkAsync, fpsCap, frameGen, frameGenAdaptive, frameGenFlowScale, frameGenPerformance, frameGenForceVsync, commandIsControl, commandIsControlSynced, dpiScale, retinaAt100, dllOverrides, dxvkAppConfig, dllOverridesSynced, engineAppDefaultsSynced, keepFilesInside, environment, gameEnvironment, pins, recipes, created }
/// The variables `gameID`'s recipe scoped to it; empty for a game without any, or with no id.
public func environment(forGame gameID: String?) -> [String: String] {
@@ -442,6 +447,7 @@ public struct BottleSettings: Codable, Sendable {
.decodeIfPresent(Bool.self, forKey: .retinaMode)) ?? nil
dpiScale = legacyRetina == true ? 192 : 96
}
+ retinaAt100 = try c.decodeIfPresent(Bool.self, forKey: .retinaAt100) ?? false
dllOverrides = try c.decodeIfPresent(String.self, forKey: .dllOverrides) ?? ""
dllOverridesSynced = try c.decodeIfPresent(String.self, forKey: .dllOverridesSynced)
engineAppDefaultsSynced = try c.decodeIfPresent(String.self, forKey: .engineAppDefaultsSynced)
diff --git a/Sources/HighballKit/PlayReport.swift b/Sources/HighballKit/PlayReport.swift
index d3ee301..edf30a8 100644
--- a/Sources/HighballKit/PlayReport.swift
+++ b/Sources/HighballKit/PlayReport.swift
@@ -45,6 +45,7 @@ public enum PlayReport {
/// setting; a setting at its default says nothing about the run).
public static func settingsSummary(_ s: BottleSettings, pin: Pin? = nil) -> String {
var lines = ["mode \(s.renderer.rawValue), sync \(s.sync.rawValue), Windows \(s.windowsVersion.rawValue), scale \(s.dpiScale) dpi"]
+ if s.retinaAt100 && s.dpiScale <= 96 { lines.append("Retina pixels at 100%") }
if s.metalHUD { lines.append("Metal HUD on") }
if s.dxvkAsync { lines.append("DXVK async shader compilation on") }
if s.advertiseAVX { lines.append("AVX advertised") }
diff --git a/Sources/HighballKit/WineRunner.swift b/Sources/HighballKit/WineRunner.swift
index 6cb8e7d..a78f6e9 100644
--- a/Sources/HighballKit/WineRunner.swift
+++ b/Sources/HighballKit/WineRunner.swift
@@ -76,6 +76,7 @@ public struct WineRunner: Sendable {
out += "# wine \(args.joined(separator: " "))\n"
out += "# sync=\(Self.effectiveSync(env: env, settings: bottle.settings))"
out += " winver=\(bottle.settings.windowsVersion.rawValue) dpi=\(bottle.settings.dpiScale)"
+ if bottle.settings.retinaAt100 && bottle.settings.dpiScale <= 96 { out += " retina" }
out += " dxvkAsync=\(bottle.settings.dxvkAsync)"
switch bottle.frameGenStatus(engine: engine, environment: env) {
case .off: out += " frameGen=off\n"
@@ -589,16 +590,17 @@ public struct WineRunner: Sendable {
/// Windows UI scaling. LogPixels is the Windows system DPI (96 = 100%, 240 = 250%): DPI-aware
/// apps and launchers follow it, though many full-screen games set their own render resolution and
- /// ignore it. At 96 the Mac driver renders at 1x; above that it switches to native Retina pixels
- /// (crisper, ~4x GPU work at native res) so the scaled UI stays sharp. Clamped to the 96..240 range
- /// Wine accepts. Pure so the mapping is unit-tested without touching a prefix.
- public static func dpiRegistry(for logPixels: Int) -> (retinaMode: String, logPixels: Int) {
+ /// ignore it. At 96 the Mac driver renders at 1x unless `retinaAt100` asks for native pixels;
+ /// above that it always switches to native Retina pixels (crisper, ~4x GPU work at native res) so
+ /// the scaled UI stays sharp. Clamped to the 96..240 range Wine accepts. Pure so the mapping is
+ /// unit-tested without touching a prefix.
+ public static func dpiRegistry(for logPixels: Int, retinaAt100: Bool = false) -> (retinaMode: String, logPixels: Int) {
let clamped = min(max(logPixels, 96), 240)
- return (clamped > 96 ? "y" : "n", clamped)
+ return (clamped > 96 || retinaAt100 ? "y" : "n", clamped)
}
- public func setDpi(logPixels: Int) async throws {
- let v = Self.dpiRegistry(for: logPixels)
+ public func setDpi(logPixels: Int, retinaAt100: Bool = false) async throws {
+ let v = Self.dpiRegistry(for: logPixels, retinaAt100: retinaAt100)
try await regAdd(key: #"HKCU\Software\Wine\Mac Driver"#, name: "RetinaMode", type: "REG_SZ", data: v.retinaMode)
try await regAdd(key: #"HKCU\Control Panel\Desktop"#, name: "LogPixels", type: "REG_DWORD", data: String(v.logPixels))
}
diff --git a/Sources/highball/main.swift b/Sources/highball/main.swift
index 60db55c..98d8de0 100644
--- a/Sources/highball/main.swift
+++ b/Sources/highball/main.swift
@@ -138,7 +138,7 @@ struct Bottle: AsyncParsableCommand {
}
struct Set: AsyncParsableCommand {
- static let configuration = CommandConfiguration(abstract: "Change a bottle setting: engine, renderer, winver, sync, hud, avx, dpi, dxvkasync, framegen, framegenadaptive, framegenflow, framegenperformance, framegenforcevsync, dlloverrides, keepfiles on|off, env KEY=VALUE (empty VALUE removes)")
+ static let configuration = CommandConfiguration(abstract: "Change a bottle setting: engine, renderer, winver, sync, hud, avx, dpi, retina on|off, dxvkasync, framegen, framegenadaptive, framegenflow, framegenperformance, framegenforcevsync, dlloverrides, keepfiles on|off, env KEY=VALUE (empty VALUE removes)")
@Argument var name: String
@Argument var setting: String
@Argument var value: String
@@ -185,7 +185,13 @@ struct Bottle: AsyncParsableCommand {
guard let scale = Int(value) else { fail("dpi expects a number (96..240; 96 = 100%, 192 = 200%)") }
b.settings.dpiScale = scale
let eng = try EngineStore().engine(b.settings.engineID)
- try await WineRunner(engine: eng, bottle: b).setDpi(logPixels: scale)
+ try await WineRunner(engine: eng, bottle: b).setDpi(logPixels: scale, retinaAt100: b.settings.retinaAt100)
+ case "retina":
+ // Native Retina pixels at 100% scaling too (above 100% they are always on).
+ let on = (value == "1" || value == "true" || value == "on")
+ b.settings.retinaAt100 = on
+ let eng = try EngineStore().engine(b.settings.engineID)
+ try await WineRunner(engine: eng, bottle: b).setDpi(logPixels: b.settings.dpiScale, retinaAt100: on)
case "env":
guard EnvAssignment.apply(value, to: &b.settings.environment) else { fail("env expects KEY=VALUE (empty VALUE removes)") }
default: fail("unknown setting \(setting)")
diff --git a/Tests/HighballKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swift
index 30d2465..75fd7cc 100644
--- a/Tests/HighballKitTests/RegressionTests.swift
+++ b/Tests/HighballKitTests/RegressionTests.swift
@@ -107,6 +107,23 @@ final class RegressionTests: XCTestCase {
XCTAssertEqual(WineRunner.dpiRegistry(for: 999).retinaMode, "y")
}
+ // A player whose game scales its own interface with Windows found even 125% too big and
+ // wanted native pixels at 100% (2026-09-29). The switch turns Retina on at 100% and leaves
+ // every other mapping, and every bottle that never set it, exactly as before.
+ func testRetinaAt100KeepsNativePixelsWithoutScaling() throws {
+ XCTAssertEqual(WineRunner.dpiRegistry(for: 96, retinaAt100: true).retinaMode, "y")
+ XCTAssertEqual(WineRunner.dpiRegistry(for: 96, retinaAt100: true).logPixels, 96, "the scaling stays at 100%")
+ XCTAssertEqual(WineRunner.dpiRegistry(for: 144, retinaAt100: false).retinaMode, "y", "above 100% Retina is on either way")
+ let old = try JSONDecoder().decode(BottleSettings.self, from: Data(#"{"name":"a","engineID":"e","dpiScale":96}"#.utf8))
+ XCTAssertFalse(old.retinaAt100, "a bottle that never set it stays at 1x")
+ var on = old
+ on.retinaAt100 = true
+ let back = try JSONDecoder().decode(BottleSettings.self, from: JSONEncoder().encode(on))
+ XCTAssertTrue(back.retinaAt100, "the choice survives a save")
+ XCTAssertTrue(PlayReport.settingsSummary(back).contains("Retina pixels at 100%"))
+ XCTAssertFalse(PlayReport.settingsSummary(old).contains("Retina"))
+ }
+
// Cmd+V beeped instead of pasting in Steam: Wine's Mac driver leaves Command acting as Alt.
// Mapping Command to Ctrl without also mapping Option to Alt leaves no way to send Alt at all
// (winemac.drv warns about exactly that), so the four values must move together.