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
Engines r15 and r16: games get their focus back after Cmd+Tab, a click on another app or a Dock restore
Gauthier Piarrettea93f5e505d9b
diff --git a/Scripts/build-winemac-focus.sh b/Scripts/build-winemac-focus.shnew file mode 100755index 0000000..c54ca9c--- /dev/null+++ b/Scripts/build-winemac-focus.sh@@ -0,0 +1,59 @@+#!/bin/zsh+# Build the focus-fixed winemac.so for the Sikarugir Wine 10.0 engines as an engine component:+# dist/winemac-focus-<tag>.tar.xz holds winemac.so at its top level, and the manifest lays it over+# engine/lib/wine/x86_64-unix/winemac.so once the Wine archive has unpacked (order 1).+# The change itself, in source form and with the reasons, is spike/patches/winemac-sikarugir10.0-focus.patch.+# This Sikarugir revision has no public source, so it goes in as three byte edits to Gcenx's own+# binary, each checked against the bytes it replaces: a Wine archive with any other winemac.so+# stops the build instead of patching the wrong place.+# Usage: Scripts/build-winemac-focus.sh [tag] -> prints the archive's sha256 and size+set -euo pipefail+cd "$(dirname "$0")/.."+TAG="${1:-$(date +%Y%m%d)}"+WINE_URL=https://github.com/Sikarugir-App/Engines/releases/download/v1.0/WS12WineSikarugir10.0_6.tar.xz+WINE_SHA=9da7ee0cbf386522f3a9906943726d9c3c125dbbd9ab120e3cde80e88d6091b2+MAC_SHA=4cbf65e363d6d8b5a70dba719b50b811fb4b2705985e93f777c6cb7a12878eb0+OUT=dist/winemac-focus; rm -rf "$OUT"; mkdir -p "$OUT" dist++# The engine installer's download cache has the archive on any Mac that installed the default engine.+ARCHIVE="$HOME/Library/Application Support/Highball/downloads/WS12WineSikarugir10.0_6.tar.xz"+if [[ ! -f "$ARCHIVE" || "$(shasum -a 256 "$ARCHIVE" | cut -d' ' -f1)" != "$WINE_SHA" ]]; then+ ARCHIVE=dist/WS12WineSikarugir10.0_6.tar.xz+ [[ -f "$ARCHIVE" ]] || curl -fL --retry 3 -o "$ARCHIVE" "$WINE_URL"+fi+[[ "$(shasum -a 256 "$ARCHIVE" | cut -d' ' -f1)" == "$WINE_SHA" ]] || { echo "the Wine archive's checksum is not $WINE_SHA" >&2; exit 1; }++tar -xJf "$ARCHIVE" -C "$OUT" wswine.bundle/lib/wine/x86_64-unix/winemac.so+SRC="$OUT/wswine.bundle/lib/wine/x86_64-unix/winemac.so"+[[ "$(shasum -a 256 "$SRC" | cut -d' ' -f1)" == "$MAC_SHA" ]] || { echo "winemac.so is not the build these offsets were read from" >&2; exit 1; }++python3 - "$SRC" "$OUT/winemac.so" <<'EOF'+import sys+b = bytearray(open(sys.argv[1], 'rb').read())+# (file offset, bytes there now, bytes written, what it does). __TEXT maps at address 0, so a file+# offset is also the address a disassembler prints.+EDITS = [+ (0x40d87, '4883ec08', 'eb71',+ 'macdrv_window_got_focus: jump past the made-up WM_MOUSEACTIVATE(HTMENU) straight to "setting foreground window" (upstream b568eaac4a)'),+ (0x193dc, '30', '20',+ 'makeFocused: discard mask GOT_FOCUS|LOST_FOCUS (0x30000000) becomes LOST_FOCUS (0x20000000) (CrossOver Hack #18896)'),+ (0x1c584, '741d', '9090',+ 'windowDidBecomeKey: no early return when Wine made the window key, so Wine hears about it (CrossOver Hack #18896)'),+]+for off, old, new, why in EDITS:+ old_b, new_b = bytes.fromhex(old), bytes.fromhex(new)+ found = bytes(b[off:off + len(old_b)])+ if found != old_b:+ sys.exit(f'{off:#x}: expected {old}, found {found.hex()}')+ b[off:off + len(new_b)] = new_b+ print(f'{off:#x} {old} -> {new} {why}')+open(sys.argv[2], 'wb').write(b)+EOF++# Ad-hoc, like the original, under the original's identifier.+ID=$(codesign -dv "$SRC" 2>&1 | sed -n 's/^Identifier=//p')+codesign -f -s - -i "$ID" "$OUT/winemac.so"+codesign -v "$OUT/winemac.so"+tar -C "$OUT" -cJf "dist/winemac-focus-$TAG.tar.xz" winemac.so+echo "winemac.so sha256 $(shasum -a 256 "$OUT/winemac.so" | cut -d' ' -f1)"+echo "dist/winemac-focus-$TAG.tar.xz sha256 $(shasum -a 256 "dist/winemac-focus-$TAG.tar.xz" | cut -d' ' -f1) size $(stat -f %z "dist/winemac-focus-$TAG.tar.xz")"diff --git a/Tests/HighballKitTests/BundledEngineTests.swift b/Tests/HighballKitTests/BundledEngineTests.swiftindex 7863f4b..61c11d2 100644--- a/Tests/HighballKitTests/BundledEngineTests.swift+++ b/Tests/HighballKitTests/BundledEngineTests.swift@@ -40,13 +40,15 @@ final class BundledEngineTests: XCTestCase {/// Frame generation left Highball on 2026-09-27 at its author's request (itsOwen's lsfg-metal,/// highball#171): no engine may ship the component any more. The revisions since are their- /// bases (r5 on the main line, r6 on the GPTK 4 line) with one component swapped: DXMT, which- /// moved from upstream's v0.80 release to Highball's own build on 2026-09-28, because v0.80's- /// D3DKMT adapter lookup fails on this Wine and every shared texture then died at creation- /// (ContractVille, highball#202). Everything else is byte-identical, so it is not downloaded- /// again, and the DXMT archive comes from Highball's own release page (a component URL has- /// to be ours to stay immutable, #27/#28).- func testNoEngineShipsFrameGenerationAndTheCurrentRevisionsAreTheirBasesPlusOurDXMT() throws {+ /// bases (r5 on the main line, r6 on the GPTK 4 line) with DXMT swapped and one file added.+ /// DXMT moved from upstream's v0.80 release to Highball's own build on 2026-09-28, because+ /// v0.80's D3DKMT adapter lookup fails on this Wine and every shared texture then died at+ /// creation (ContractVille, highball#202). The Mac driver's winemac.so is replaced on+ /// 2026-09-30 so a game gets its focus back after the player leaves it (highball#182).+ /// Everything else is byte-identical, so it is not downloaded again, and both new archives+ /// come from Highball's own release pages (a component URL has to be ours to stay immutable,+ /// #27/#28).+ func testNoEngineShipsFrameGenerationAndTheCurrentRevisionsAreTheirBasesPlusOurDXMTAndDriver() throws {let all = try manifests() + [try EngineManifest.load(from: engines.deletingLastPathComponent().appending(path: "engine-manifest.json"))]for m in all {XCTAssertNil(m.components["lsfg"], "\(m.id) still ships the lsfg component")@@ -55,11 +57,11 @@ final class BundledEngineTests: XCTestCase {}}func one(_ id: String) throws -> EngineManifest { try XCTUnwrap(all.first { $0.id == id }, "\(id) missing") }- for (current, baseID) in [("x64-sikarugir10.0_6-r13", "x64-sikarugir10.0_6-r5"), ("x64-sikarugir10.0_6-r14", "x64-sikarugir10.0_6-r6")] {+ for (current, baseID) in [("x64-sikarugir10.0_6-r15", "x64-sikarugir10.0_6-r5"), ("x64-sikarugir10.0_6-r16", "x64-sikarugir10.0_6-r6")] {let r = try one(current), base = try one(baseID)XCTAssertEqual(r.minMacOS, base.minMacOS, "\(current) must keep \(baseID)'s floor")XCTAssertEqual(r.baseEnv?["D3DM_MTL4"], base.baseEnv?["D3DM_MTL4"], "\(current) must keep \(baseID)'s Metal 4 setting")- XCTAssertEqual(Set(r.components.keys), Set(base.components.keys), "\(current) has exactly \(baseID)'s components")+ XCTAssertEqual(Set(r.components.keys), Set(base.components.keys).union(["winemac"]), "\(current) has exactly \(baseID)'s components plus the driver")for (name, component) in base.components where name != "dxmt" {XCTAssertEqual(r.components[name]?.sha256, component.sha256, "\(name) drifted from \(baseID), so its download is not reused")}@@ -67,7 +69,19 @@ final class BundledEngineTests: XCTestCase {XCTAssertTrue(dxmt.url.absoluteString.hasPrefix("https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-"),"\(current)'s DXMT must be Highball's own build from its release page: \(dxmt.url)")XCTAssertNotEqual(dxmt.sha256, base.components["dxmt"]?.sha256, "\(current) must not carry \(baseID)'s v0.80 DXMT")++ // The driver file is three byte edits to the Wine archive's own winemac.so+ // (Scripts/build-winemac-focus.sh checks every byte it touches), so it is only valid+ // over that exact archive, and only if it lands after it and on that one file.+ let winemac = try XCTUnwrap(r.components["winemac"])+ XCTAssertEqual(r.components["wine"]?.sha256, "9da7ee0cbf386522f3a9906943726d9c3c125dbbd9ab120e3cde80e88d6091b2",+ "\(current)'s driver was made for the Sikarugir 10.0_6 archive and no other")+ XCTAssertEqual(winemac.extract?.into, "engine/lib/wine/x86_64-unix/winemac.so", "the driver replaces one file, the Wine archive's own")+ XCTAssertGreaterThan(winemac.order ?? 0, r.components["wine"]?.order ?? 0, "the driver must unpack after the Wine archive it replaces a file of")+ XCTAssertTrue(winemac.url.absoluteString.hasPrefix("https://github.com/gauthierpiarrette/highball-engine/releases/download/winemac-focus-"),+ "\(current)'s driver must come from Highball's own release page: \(winemac.url)")}- XCTAssertEqual(all.last?.id, "x64-sikarugir10.0_6-r13", "r13 is the default engine")+ XCTAssertEqual(all.last?.id, "x64-sikarugir10.0_6-r15", "r15 is the default engine")+ XCTAssertNotNil(all.first { $0.id == "x64-sikarugir10.0_6-r13" }, "r13 stays offered for rollback")}}diff --git a/spike/engine-manifest.json b/spike/engine-manifest.jsonindex b05e371..fc5afa0 100644--- a/spike/engine-manifest.json+++ b/spike/engine-manifest.json@@ -1,13 +1,14 @@{"$schema": "https://highball.app/schemas/engine-manifest/v0",- "id": "x64-sikarugir10.0_6-r13",- "displayName": "Wine 10.0 (Sikarugir) + DXMT (Highball build, 2026-09) + D3DMetal 3.0 + MoltenVK 1.4.1 (shadow-import patch) + DXVK 3.1 macOS fork Direct3D 9 (opt-in per game)",+ "id": "x64-sikarugir10.0_6-r15",+ "displayName": "Wine 10.0 (Sikarugir, focus fix) + DXMT (Highball build, 2026-09) + D3DMetal 3.0 + MoltenVK 1.4.1 (shadow-import patch) + DXVK 3.1 macOS fork Direct3D 9 (opt-in per game)","arch": "x86_64","minMacOS": "14.0","requires": ["rosetta2"],"notes": [+ "r15 (2026-09-30): r13 with the Mac driver's focus fixed (winemac component, highball#182). Wine 10.0's driver sent a game a made-up WM_MOUSEACTIVATE with a title-bar hit before giving it focus back, and Unity takes that as a click in the title bar and then ignores the focus gain: after Cmd+Tab, a click on another app or a Dock restore, Unity games kept drawing and dropped every click and key until restarted (Among Us, Umamusume, Heartopia; upstream b568eaac4a, Wine bug 48121, fixed in wine-10.6). Separately, when a game made its own window key without becoming the foreground window (Heartopia's Unity player at start), the driver dropped the focus event macOS sent back, so Wine kept the desktop as foreground and raw input never reached the game: its mouse was dead from the first frame (CrossOver Hack #18896, which CrossOver 26.3 carries). Measured on an M4 with macOS 27.0 before publishing, with this winemac.so in place: Among Us, Umamusume and Heartopia take input after every way of leaving and coming back that failed before, Heartopia takes its first click at start where it took none, Five Nights at Freddy's and the Half-Life 2 demo are unchanged, and the Steam client ran on it throughout. Every other component is byte-identical to r13, so only the 160 KB winemac archive is new.","r13 (2026-09-28): r11 with Highball's DXMT build (fork branch highball-20260928, 5c50790) in place of upstream v0.80. DXMT opens Wine's D3DKMT adapter by a LUID made from the GPU's IOKit registry ID, which this Wine's Mac driver does not assign (Wine 11's does), so no D3DKMT device existed and an Unreal game that creates a shared render target at start died with CreateTexture2D E_FAIL: ContractVille (highball#202) and the Gold Mining Simulator 2 demo (highball#215), while the same games start on the Wine 11 engines. This build no longer fails a shared texture when no D3DKMT device is there: the texture is created as a private one, which is all the game's own rendering needs, and the log says so once. Measured on an M1 Pro, macOS 27.0, before publishing: ContractVille no longer crashes at start on DXMT here (it then meets this Wine's own stall on its loading screen, a separate fault its entry describes), CloverPit's demo still runs. Every other component is byte-identical to r11, so only the 19 MB DXMT archive is new.","r11 (2026-09-27): r9 without the lsfg component. Its author asked for lsfg-metal to leave Highball over a licensing dispute he did not want to carry, so it is no longer distributed: no engine ships it and the archives come down once this build has reached everyone. Every remaining component is byte-identical to r5, so nothing new downloads. An environment already on r9 keeps the files it has; frame generation is simply not offered on this engine.","Engine is Gcenx's Sikarugir build of upstream Wine 10.0: exports macdrv_functions from winemac.so (required by both DXMT and D3DMetal bridges) and supports WINEDLLPATH_PREPEND for per-bottle renderer overlays.",@@ -120,6 +121,20 @@"i386-windows/d3d9.dll"],"note": "The metalsharp DXVK-MacOS v3.1-macos1.0 Direct3D 9 (DXVK 3.1 with the Gcenx MoltenVK work), both architectures, stamped as Wine builtins. Not on any launch's search path: the template's DXVK-Kegworks 1.10.4 d9vk stays the Direct3D 9 every game gets. A game's recipe copies this one beside the game's executable with a per-program native override when the row says the newer layer is the one that runs it (RaceRoom, highball-db#60). It rendered RaceRoom for one reporter and drew it in grayscale for another, and froze Five Nights at Freddy's, when the r4 candidate put it on every launch's path, which is why it is opt-in per game."+ },+ "winemac": {+ "kind": "patch",+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/winemac-focus-20260930/winemac-focus-20260930.tar.xz",+ "sha256": "0192214d7d5c7cc8acd13dcacb0c27e8313ef0c64c51b91a93deff0a851a8974",+ "size": 162192,+ "license": "LGPL-2.1+ (Wine; the change in source form is spike/patches/winemac-sikarugir10.0-focus.patch)",+ "version": "20260930",+ "order": 1,+ "extract": {+ "subpath": "winemac.so",+ "into": "engine/lib/wine/x86_64-unix/winemac.so"+ },+ "note": "The Wine archive's winemac.so (sha256 4cbf65e3…) with three byte edits, made and checked by Scripts/build-winemac-focus.sh, re-signed ad hoc under its own identifier: upstream b568eaac4a (no made-up WM_MOUSEACTIVATE when macOS gives a window focus, Wine bug 48121) and both halves of CrossOver Hack #18896 (the driver no longer drops the focus event for a window Wine made key). Replaces the file after the Wine archive unpacks (order 1)."}},"alternatives": {@@ -142,10 +157,10 @@"GST_PLUGIN_PATH": "${frameworks}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0"},"verified": {- "date": "2026-09-22",+ "date": "2026-09-30","macos": "27.0",- "chip": "Apple M2",- "result": "Installed end to end from this manifest by the pull request's own install check on 2026-09-22, a fresh install on a GitHub macOS 15 runner: engine with lsfg, bottle creation, wow64, a bare wine smoke and vcrun2022 all passed. The pinned archive is a byte copy of the published lsfg-metal v0.7.1 asset, mirrored under Highball's engine-components release on 2026-09-24 with its SHA-256 unchanged. The component itself was measured by placing it in an r5 engine by hand: GStreamer's libgstapplemedia.dylib loads with the shim on the path and fails the same load against v0.7.0, and Absolute Drift ran 60 s at 2x through DXVK and through DXMT at about 30 source fps shown at about 60, with no warnings in the shim log."+ "chip": "Apple M4",+ "result": "Installed end to end from this manifest on an M4 with macOS 27.0; the installed winemac.so is the published file (sha256 4df20d0d…). On it, Heartopia takes its first click at start and takes input after a Finder round trip, and a stand-in window that starts the way Heartopia's player does becomes the foreground, keeps raw input and gets focus back after a Cmd+Tab round trip and a Dock restore. With the same file placed in an r13 engine by hand: Among Us after Cmd+Tab; Umamusume after a Dock restore, Cmd+Tab and a click on another app; Five Nights at Freddy's and the Half-Life 2 demo unchanged; the Steam client throughout."},"licenses": {"apple-gptk-license-2023-08-17": {diff --git a/spike/engines/x64-sikarugir10.0_6-r13.json b/spike/engines/x64-sikarugir10.0_6-r13.jsonnew file mode 100644index 0000000..b05e371--- /dev/null+++ b/spike/engines/x64-sikarugir10.0_6-r13.json@@ -0,0 +1,159 @@+{+ "$schema": "https://highball.app/schemas/engine-manifest/v0",+ "id": "x64-sikarugir10.0_6-r13",+ "displayName": "Wine 10.0 (Sikarugir) + DXMT (Highball build, 2026-09) + D3DMetal 3.0 + MoltenVK 1.4.1 (shadow-import patch) + DXVK 3.1 macOS fork Direct3D 9 (opt-in per game)",+ "arch": "x86_64",+ "minMacOS": "14.0",+ "requires": [+ "rosetta2"+ ],+ "notes": [+ "r13 (2026-09-28): r11 with Highball's DXMT build (fork branch highball-20260928, 5c50790) in place of upstream v0.80. DXMT opens Wine's D3DKMT adapter by a LUID made from the GPU's IOKit registry ID, which this Wine's Mac driver does not assign (Wine 11's does), so no D3DKMT device existed and an Unreal game that creates a shared render target at start died with CreateTexture2D E_FAIL: ContractVille (highball#202) and the Gold Mining Simulator 2 demo (highball#215), while the same games start on the Wine 11 engines. This build no longer fails a shared texture when no D3DKMT device is there: the texture is created as a private one, which is all the game's own rendering needs, and the log says so once. Measured on an M1 Pro, macOS 27.0, before publishing: ContractVille no longer crashes at start on DXMT here (it then meets this Wine's own stall on its loading screen, a separate fault its entry describes), CloverPit's demo still runs. Every other component is byte-identical to r11, so only the 19 MB DXMT archive is new.",+ "r11 (2026-09-27): r9 without the lsfg component. Its author asked for lsfg-metal to leave Highball over a licensing dispute he did not want to carry, so it is no longer distributed: no engine ships it and the archives come down once this build has reached everyone. Every remaining component is byte-identical to r5, so nothing new downloads. An environment already on r9 keeps the files it has; frame generation is simply not offered on this engine.",+ "Engine is Gcenx's Sikarugir build of upstream Wine 10.0: exports macdrv_functions from winemac.so (required by both DXMT and D3DMetal bridges) and supports WINEDLLPATH_PREPEND for per-bottle renderer overlays.",+ "Vanilla Gcenx wine-devel 11.15 lacks the macdrv_functions export -> DXMT and D3DMetal do NOT work on it. Verified 2026-08-23 with nm.",+ "Runtime dylibs (GStreamer, MoltenVK, gnutls, freetype, SDL2, icu...) are NOT inside the engine; they come from the Sikarugir Wrapper Template's Frameworks/ and are found via DYLD_FALLBACK_LIBRARY_PATH.",+ "Wine 10 still ships a wine64 binary but the loader is `wine`; use `wine` so Wine 11 engines work unchanged.",+ "D3DMetal is NOT downloaded separately: the Template's frameworks/renderer/d3dmetal overlay is used, but only exposed once the user has accepted the Apple GPTK license (recorded in manifest.json as acceptedLicenses).",+ "r1 (2026-09-02): adds the moltenvk component. Everything else is byte-identical to r0, so existing downloads are reused; only the 5 MB MoltenVK tarball is new.",+ "r2 (2026-09-07): adds the d3dmetal-tsshim component, a d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz, which crashes Guardians of the Galaxy, highball#63). Everything else is byte-identical to r1, so existing downloads are reused; only the 46 KB shim tarball is new. Source: spike/tsshim, Scripts/build-tsshim.sh.",+ "r3 (2026-09-15): the d3dmetal-tsshim component rebuilt so its exports carry Microsoft's d3d12 ordinals (GetBehaviorValue 100, D3D12CreateDevice 101, ... 110), which D3DMetal mirrors. The r2 shim numbered them from 1, so a game that binds d3d12 imports by ordinal (Path of Exile 2 delay-loads D3D12CreateDevice as ordinal 101) died at startup with 'ordinal 101 out of range' and Wine's exception 0xc06d007f (highball-db#53). Everything else is byte-identical to r2, so existing downloads are reused; only the 46 KB shim tarball is new. Source: spike/tsshim, Scripts/build-tsshim.sh 20260915.",+ "r5 (2026-09-18): adds the d9vk-modern component, the DXVK-MacOS 3.1 Direct3D 9 that the withdrawn r4 candidate had put on every launch's search path, now as a directory nothing loads by itself. A game's recipe copies it beside the game with a per-program override (the legacy CS:GO copy mechanism). Every other component is byte-identical to r3, so existing downloads are reused; only the 10 MB d9vk archive is new, and it was already published for r4."+ ],+ "components": {+ "wine": {+ "kind": "engine",+ "url": "https://github.com/Sikarugir-App/Engines/releases/download/v1.0/WS12WineSikarugir10.0_6.tar.xz",+ "sha256": "9da7ee0cbf386522f3a9906943726d9c3c125dbbd9ab120e3cde80e88d6091b2",+ "size": 166304096,+ "license": "LGPL-2.1+",+ "extract": {+ "strip": "wswine.bundle",+ "into": "engine"+ },+ "version": "wine-10.0 (Sikarugir) revision 6"+ },+ "runtime": {+ "kind": "frameworks",+ "url": "https://github.com/Sikarugir-App/Wrapper/releases/download/v1.0/Template-1.0.11.tar.xz",+ "sha256": "9fa15479e7ff6abd99c1d07be285fb95f41fc6991586502427152b1f7d6ccb8a",+ "size": 84533420,+ "license": "mixed (LGPL-2.1 GStreamer, Apache-2.0 MoltenVK, LGPL gnutls, ...)",+ "extract": {+ "subpath": "Template-1.0.11.app/Contents/Frameworks",+ "into": "frameworks"+ },+ "provides": [+ "GStreamer.framework 1.0",+ "libMoltenVK.dylib",+ "renderer/dxmt v0.74",+ "renderer/d3dmetal 3.0",+ "renderer/dxvk 1.10.3-async",+ "renderer/d9vk 1.10.4-async",+ "renderer/cnc-ddraw 7.1.0.0"+ ]+ },+ "dxmt": {+ "extract": {+ "into": "renderers/dxmt/wine",+ "subpath": "highball"+ },+ "kind": "renderer",+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",+ "sha256": "1b02c65ce31c49b2ae658b4dc9c5edf374ab3a36888bbd172aa2785b2055a551",+ "size": 18923879,+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260928T092049Z-5c50790/dxmt-highball-20260928T092049Z-5c50790.tar.gz",+ "note": "DXMT from Highball's fork (gauthierpiarrette/dxmt, branch highball-20260928 at 5c50790): upstream main of 2026-09-16 (v0.80 plus five months of upstream work, among it keyed-mutex and shared-resource support and DXGI functions Steam's overlay can hook) plus four Highball changes: cross-process swapchains behind DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN (off by default), SwapDeviceContextState implemented instead of aborting, 2D textures answering IDXGISurface, and the one that matters on this Wine: a shared texture with no D3DKMT device behind it is created as a private one, with one error line, instead of failing the game. On this Wine the driver assigns GPU LUIDs of its own, so DXMT's lookup of its adapter fails (the build also tries the primary display's name, which fails here too) and there is never a D3DKMT device; before this build every shared texture then died at creation."+ },+ "d3dmetal-tsshim": {+ "kind": "renderer",+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20260915/d3dmetal-tsshim-20260915.tar.xz",+ "sha256": "453f33ef1442ec8d24e9a44d901d35d4d07431c05ae8318c30567facc78d9ef3",+ "size": 46116,+ "license": "MIT",+ "version": "20260915",+ "order": 1,+ "extract": {+ "subpath": "renderers/d3dmetal-tsshim/wine",+ "into": "renderers/d3dmetal-tsshim/wine"+ },+ "layout": [+ "x86_64-windows/d3d12.dll"+ ],+ "note": "A d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz). Exports carry Microsoft's d3d12 ordinals (D3D12CreateDevice at 101), which D3DMetal mirrors, so games that bind d3d12 imports by ordinal load through it. Kill switch HB_D3D12_TSSHIM=0 idles the patches; the DLL stays in front. Source: spike/tsshim, Scripts/build-tsshim.sh."+ },+ "winetricks": {+ "kind": "tool",+ "url": "https://raw.githubusercontent.com/Winetricks/winetricks/5a59ea07513b24093bd90fad943ecf9543cf05bc/src/winetricks",+ "sha256": "f35c29737ca08a583569e6a3752d52fbe23333c5acfad5f16c4177d25eaf3f4b",+ "license": "LGPL-2.1",+ "note": "Pinned to upstream commit 5a59ea07 (20260125+dev, 2026-08-07) — the exact bytes 0.7.x verified with dotnet48. The old branch URL drifted and broke every fresh engine install (issues #27/#28); URLs here must be immutable."+ },+ "moltenvk": {+ "kind": "runtime",+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.1-shadow-import-1-x86_64.tar.gz",+ "sha256": "fbed7b80d6dc2aeaba6fa7047c1fe64827d5004c28029fb43c2bc34f80c35228",+ "size": 1674937,+ "license": "Apache-2.0",+ "version": "1.4.1+shadow-import-1",+ "order": 1,+ "extract": {+ "subpath": "libMoltenVK.dylib",+ "into": "frameworks/libMoltenVK.dylib"+ },+ "note": "MoltenVK 1.4.1 rebuilt with Highball's shadow-import patch (spike/patches/moltenvk-shadow-import.patch, Scripts/build-moltenvk.sh). Replaces the Template's libMoltenVK.dylib. Off unless a launch sets MVK_SHADOW_IMPORT=1: with it, Wine's wow64 host-memory imports are backed by a private Metal buffer synced on every submit, which is what makes 32-bit native-Vulkan games (The Sims Legacy Collection) render instead of losing the device on every vkQueueSubmit."+ },+ "d9vk-modern": {+ "kind": "renderer",+ "order": 1,+ "version": "dxvk-macos-3.1-20260916",+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d9vk-dxvk-macos-3.1-20260916/d9vk-dxvk-macos-3.1-20260916.tar.xz",+ "sha256": "0fabdffde07ef1ef041e95181ca1507db96919cf70acfa91a15c159718ad7611",+ "size": 9766808,+ "license": "zlib",+ "extract": {+ "subpath": "renderers/d9vk/wine",+ "into": "renderers/d9vk-modern/wine"+ },+ "layout": [+ "x86_64-windows/d3d9.dll",+ "i386-windows/d3d9.dll"+ ],+ "note": "The metalsharp DXVK-MacOS v3.1-macos1.0 Direct3D 9 (DXVK 3.1 with the Gcenx MoltenVK work), both architectures, stamped as Wine builtins. Not on any launch's search path: the template's DXVK-Kegworks 1.10.4 d9vk stays the Direct3D 9 every game gets. A game's recipe copies this one beside the game's executable with a per-program native override when the row says the newer layer is the one that runs it (RaceRoom, highball-db#60). It rendered RaceRoom for one reporter and drew it in grayscale for another, and froze Five Nights at Freddy's, when the r4 candidate put it on every launch's path, which is why it is opt-in per game."+ }+ },+ "alternatives": {+ "wine-devel-11.15": {+ "url": "https://github.com/Gcenx/macOS_Wine_builds/releases/download/11.15/wine-devel-11.15-osx64.tar.xz",+ "sha256": "3f8e89a4874953a69e7be3dcdcc262d0346e462a9374bd116770fffb9e2a99d2",+ "status": "usable for WineD3D/DXVK only; no macdrv_functions export; needs external GStreamer.framework (pkg install, sudo)"+ },+ "gptk-3.0-3": {+ "url": "https://github.com/Gcenx/game-porting-toolkit/releases/download/Game-Porting-Toolkit-3.0-3/game-porting-toolkit-3.0-3.tar.xz",+ "sha256": "d377683937340f914823dbb2e1252b329cbf834ff58907d0293db8cebf0e392e",+ "size": 239200808,+ "status": "canonical source of D3DMetal 3.0; not needed because the Template's renderer/d3dmetal carries the same framework with bridges built for this engine"+ }+ },+ "baseEnv": {+ "WINEDEBUG": "fixme-all",+ "DYLD_FALLBACK_LIBRARY_PATH": "${frameworks}:${frameworks}/GStreamer.framework/Versions/1.0/lib",+ "DYLD_FALLBACK_FRAMEWORK_PATH": "${frameworks}",+ "GST_PLUGIN_PATH": "${frameworks}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0"+ },+ "verified": {+ "date": "2026-09-22",+ "macos": "27.0",+ "chip": "Apple M2",+ "result": "Installed end to end from this manifest by the pull request's own install check on 2026-09-22, a fresh install on a GitHub macOS 15 runner: engine with lsfg, bottle creation, wow64, a bare wine smoke and vcrun2022 all passed. The pinned archive is a byte copy of the published lsfg-metal v0.7.1 asset, mirrored under Highball's engine-components release on 2026-09-24 with its SHA-256 unchanged. The component itself was measured by placing it in an r5 engine by hand: GStreamer's libgstapplemedia.dylib loads with the shim on the path and fails the same load against v0.7.0, and Absolute Drift ran 60 s at 2x through DXVK and through DXMT at about 30 source fps shown at about 60, with no warnings in the shim log."+ },+ "licenses": {+ "apple-gptk-license-2023-08-17": {+ "applies": [+ "renderers/d3dmetal (bundled in the Sikarugir Template: D3DMetal.framework sha1 1405e5c6… identical to GPTK 3.0-3)"+ ],+ "text": "spike/d3dmetal-license.txt",+ "summary": "Apple Game Porting Toolkit license: non-commercial use/distribution only; no modification; use scoped to developing, testing or evaluating games on Apple hardware."+ }+ }+}diff --git a/spike/engines/x64-sikarugir10.0_6-r16.json b/spike/engines/x64-sikarugir10.0_6-r16.jsonnew file mode 100644index 0000000..53535e6--- /dev/null+++ b/spike/engines/x64-sikarugir10.0_6-r16.json@@ -0,0 +1,169 @@+{+ "$schema": "https://highball.app/schemas/engine-manifest/v0",+ "id": "x64-sikarugir10.0_6-r16",+ "displayName": "Wine 10.0 (Sikarugir) r16, D3DMetal 4.0 beta 2",+ "arch": "x86_64",+ "minMacOS": "27.0",+ "requires": [+ "rosetta2"+ ],+ "notes": [+ "r16 (2026-09-30): r14 with the Mac driver's focus fixed (winemac component, highball#182). Wine 10.0's driver sent a game a made-up WM_MOUSEACTIVATE with a title-bar hit before giving it focus back, and Unity takes that as a click in the title bar and then ignores the focus gain: after Cmd+Tab, a click on another app or a Dock restore, Unity games kept drawing and dropped every click and key until restarted (Among Us, Umamusume, Heartopia; upstream b568eaac4a, Wine bug 48121, fixed in wine-10.6). Separately, when a game made its own window key without becoming the foreground window (Heartopia's Unity player at start), the driver dropped the focus event macOS sent back, so Wine kept the desktop as foreground and raw input never reached the game: its mouse was dead from the first frame (CrossOver Hack #18896, which CrossOver 26.3 carries). Measured on an M4 with macOS 27.0 before publishing, with this winemac.so in place: Among Us, Umamusume and Heartopia take input after every way of leaving and coming back that failed before, Heartopia takes its first click at start where it took none, Five Nights at Freddy's and the Half-Life 2 demo are unchanged, and the Steam client ran on it throughout. Every other component is byte-identical to r14, so only the 160 KB winemac archive is new.",+ "r14 (2026-09-28): r12 with Highball's DXMT build (fork branch highball-20260928, 5c50790) in place of upstream v0.80. DXMT opens Wine's D3DKMT adapter by a LUID made from the GPU's IOKit registry ID, which this Wine's Mac driver does not assign (Wine 11's does), so no D3DKMT device existed and an Unreal game that creates a shared render target at start died with CreateTexture2D E_FAIL: ContractVille (highball#202) and the Gold Mining Simulator 2 demo (highball#215), while the same games start on the Wine 11 engines. This build no longer fails a shared texture when no D3DKMT device is there: the texture is created as a private one, which is all the game's own rendering needs, and the log says so once. Measured on an M1 Pro, macOS 27.0, before publishing: ContractVille no longer crashes at start on DXMT here (it then meets this Wine's own stall on its loading screen, a separate fault its entry describes), CloverPit's demo still runs. Every other component is byte-identical to r12, so only the 19 MB DXMT archive is new.",+ "r12 (2026-09-27): r10 without the lsfg component. Its author asked for lsfg-metal to leave Highball over a licensing dispute he did not want to carry, so it is no longer distributed: no engine ships it and the archives come down once this build has reached everyone. Every remaining component is byte-identical to r6, so nothing new downloads. An environment already on r10 keeps the files it has; frame generation is simply not offered on this engine.",+ "r6 = r5 with D3DMetal from Game Porting Toolkit 4.0 beta 2 (highball#85). Only D3DMetal (DirectX 12) games see a difference; DXMT and DXVK are unchanged. Offered on macOS 27 or newer.",+ "baseEnv D3DM_MTL4=0: D3DMetal 4.0b2's Metal 4 backend ended HumanitZ's menu quietly within a minute, twice, with no message and nothing from Metal validation (which, by slowing the work, let it survive), so it is a timing bug in Apple's beta. On the Metal 3 path inside 4.0b2 the same title held for the whole run at a fifth of the memory (about 260 MB resident against 1.26 GB on r5), and The Last Caretaker demo drew at 99% GPU where r5 sat at 2% (its black screen). Set D3DM_MTL4=1 in a game's environment to try the Metal 4 backend. Measured 2026-09-19 on an M1 Pro, macOS 27.0, session locked (process, GPU load and logs; no captures).",+ "Engine is Gcenx's Sikarugir build of upstream Wine 10.0: exports macdrv_functions from winemac.so (required by both DXMT and D3DMetal bridges) and supports WINEDLLPATH_PREPEND for per-bottle renderer overlays.",+ "Vanilla Gcenx wine-devel 11.15 lacks the macdrv_functions export -> DXMT and D3DMetal do NOT work on it. Verified 2026-08-23 with nm.",+ "Runtime dylibs (GStreamer, MoltenVK, gnutls, freetype, SDL2, icu...) are NOT inside the engine; they come from the Sikarugir Wrapper Template's Frameworks/ and are found via DYLD_FALLBACK_LIBRARY_PATH.",+ "Wine 10 still ships a wine64 binary but the loader is `wine`; use `wine` so Wine 11 engines work unchanged.",+ "D3DMetal is NOT downloaded separately: the Template's frameworks/renderer/d3dmetal overlay is used, but only exposed once the user has accepted the Apple GPTK license (recorded in manifest.json as acceptedLicenses).",+ "r1 (2026-09-02): adds the moltenvk component. Everything else is byte-identical to r0, so existing downloads are reused; only the 5 MB MoltenVK tarball is new.",+ "r2 (2026-09-07): adds the d3dmetal-tsshim component, a d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz, which crashes Guardians of the Galaxy, highball#63). Everything else is byte-identical to r1, so existing downloads are reused; only the 46 KB shim tarball is new. Source: spike/tsshim, Scripts/build-tsshim.sh.",+ "r3 (2026-09-15): the d3dmetal-tsshim component rebuilt so its exports carry Microsoft's d3d12 ordinals (GetBehaviorValue 100, D3D12CreateDevice 101, ... 110), which D3DMetal mirrors. The r2 shim numbered them from 1, so a game that binds d3d12 imports by ordinal (Path of Exile 2 delay-loads D3D12CreateDevice as ordinal 101) died at startup with 'ordinal 101 out of range' and Wine's exception 0xc06d007f (highball-db#53). Everything else is byte-identical to r2, so existing downloads are reused; only the 46 KB shim tarball is new. Source: spike/tsshim, Scripts/build-tsshim.sh 20260915.",+ "r5 (2026-09-18): adds the d9vk-modern component, the DXVK-MacOS 3.1 Direct3D 9 that the withdrawn r4 candidate had put on every launch's search path, now as a directory nothing loads by itself. A game's recipe copies it beside the game with a per-program override (the legacy CS:GO copy mechanism). Every other component is byte-identical to r3, so existing downloads are reused; only the 10 MB d9vk archive is new, and it was already published for r4."+ ],+ "components": {+ "d3dmetal": {+ "kind": "renderer",+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/d3dmetal-4.0b2-gptk4.tar.xz",+ "sha256": "96cbbe89b71cb07cc33bd761ae4b79452b9cdf3198593dfb779036caf85f07a9",+ "size": 16462052,+ "license": "apple-gptk-license-2023-08-17",+ "version": "D3DMetal-4.0b2 (Game Porting Toolkit 4.0 beta 2, redist/lib; Apple Software Signing chain verified 2026-09-19)",+ "order": 1,+ "extract": {+ "subpath": "renderers/d3dmetal",+ "into": "renderers/d3dmetal"+ },+ "layout": [+ "external/D3DMetal.framework",+ "external/libd3dshared.dylib",+ "wine/x86_64-windows/{d3d10,d3d11,d3d12,dxgi,nvapi64,nvngx-on-metalfx}.dll",+ "wine/x86_64-unix/*.so -> ../../external/libd3dshared.dylib"+ ],+ "note": "Apple's D3DMetal from GPTK 4 (Metal 4), laid over the Template's GPTK 3 copy: rendererDir prefers renderers/d3dmetal. Same Apple licence text as GPTK 3 (identical modulo whitespace, 2026-09-19), so the same licence id and acceptance apply. The framework's own minimum is macOS 14, but it is offered on 27 or newer only, where it was measured."+ },+ "d3dmetal-tsshim": {+ "extract": {+ "into": "renderers/d3dmetal-tsshim/wine",+ "subpath": "renderers/d3dmetal-tsshim/wine"+ },+ "kind": "renderer",+ "license": "MIT",+ "note": "A d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz). Exports carry Microsoft's d3d12 ordinals (D3D12CreateDevice at 101), which D3DMetal mirrors, so games that bind d3d12 imports by ordinal load through it. Kill switch HB_D3D12_TSSHIM=0 idles the patches; the DLL stays in front. Source: spike/tsshim, Scripts/build-tsshim.sh.",+ "order": 1,+ "sha256": "453f33ef1442ec8d24e9a44d901d35d4d07431c05ae8318c30567facc78d9ef3",+ "size": 46116,+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20260915/d3dmetal-tsshim-20260915.tar.xz",+ "version": "20260915"+ },+ "d9vk-modern": {+ "extract": {+ "into": "renderers/d9vk-modern/wine",+ "subpath": "renderers/d9vk/wine"+ },+ "kind": "renderer",+ "license": "zlib",+ "note": "The metalsharp DXVK-MacOS v3.1-macos1.0 Direct3D 9 (DXVK 3.1 with the Gcenx MoltenVK work), both architectures, stamped as Wine builtins. Not on any launch's search path: the template's DXVK-Kegworks 1.10.4 d9vk stays the Direct3D 9 every game gets. A game's recipe copies this one beside the game's executable with a per-program native override when the row says the newer layer is the one that runs it (RaceRoom, highball-db#60). It rendered RaceRoom for one reporter and drew it in grayscale for another, and froze Five Nights at Freddy's, when the r4 candidate put it on every launch's path, which is why it is opt-in per game.",+ "order": 1,+ "sha256": "0fabdffde07ef1ef041e95181ca1507db96919cf70acfa91a15c159718ad7611",+ "size": 9766808,+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d9vk-dxvk-macos-3.1-20260916/d9vk-dxvk-macos-3.1-20260916.tar.xz",+ "version": "dxvk-macos-3.1-20260916"+ },+ "dxmt": {+ "extract": {+ "into": "renderers/dxmt/wine",+ "subpath": "highball"+ },+ "kind": "renderer",+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",+ "sha256": "1b02c65ce31c49b2ae658b4dc9c5edf374ab3a36888bbd172aa2785b2055a551",+ "size": 18923879,+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260928T092049Z-5c50790/dxmt-highball-20260928T092049Z-5c50790.tar.gz",+ "note": "DXMT from Highball's fork (gauthierpiarrette/dxmt, branch highball-20260928 at 5c50790): upstream main of 2026-09-16 (v0.80 plus five months of upstream work, among it keyed-mutex and shared-resource support and DXGI functions Steam's overlay can hook) plus four Highball changes: cross-process swapchains behind DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN (off by default), SwapDeviceContextState implemented instead of aborting, 2D textures answering IDXGISurface, and the one that matters on this Wine: a shared texture with no D3DKMT device behind it is created as a private one, with one error line, instead of failing the game. On this Wine the driver assigns GPU LUIDs of its own, so DXMT's lookup of its adapter fails (the build also tries the primary display's name, which fails here too) and there is never a D3DKMT device; before this build every shared texture then died at creation."+ },+ "moltenvk": {+ "extract": {+ "into": "frameworks/libMoltenVK.dylib",+ "subpath": "libMoltenVK.dylib"+ },+ "kind": "runtime",+ "license": "Apache-2.0",+ "note": "MoltenVK 1.4.1 rebuilt with Highball's shadow-import patch (spike/patches/moltenvk-shadow-import.patch, Scripts/build-moltenvk.sh). Replaces the Template's libMoltenVK.dylib. Off unless a launch sets MVK_SHADOW_IMPORT=1: with it, Wine's wow64 host-memory imports are backed by a private Metal buffer synced on every submit, which is what makes 32-bit native-Vulkan games (The Sims Legacy Collection) render instead of losing the device on every vkQueueSubmit.",+ "order": 1,+ "sha256": "fbed7b80d6dc2aeaba6fa7047c1fe64827d5004c28029fb43c2bc34f80c35228",+ "size": 1674937,+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.1-shadow-import-1-x86_64.tar.gz",+ "version": "1.4.1+shadow-import-1"+ },+ "runtime": {+ "extract": {+ "into": "frameworks",+ "subpath": "Template-1.0.11.app/Contents/Frameworks"+ },+ "kind": "frameworks",+ "license": "mixed (LGPL-2.1 GStreamer, Apache-2.0 MoltenVK, LGPL gnutls, ...)",+ "sha256": "9fa15479e7ff6abd99c1d07be285fb95f41fc6991586502427152b1f7d6ccb8a",+ "size": 84533420,+ "url": "https://github.com/Sikarugir-App/Wrapper/releases/download/v1.0/Template-1.0.11.tar.xz"+ },+ "wine": {+ "extract": {+ "into": "engine",+ "strip": "wswine.bundle"+ },+ "kind": "engine",+ "license": "LGPL-2.1+",+ "sha256": "9da7ee0cbf386522f3a9906943726d9c3c125dbbd9ab120e3cde80e88d6091b2",+ "size": 166304096,+ "url": "https://github.com/Sikarugir-App/Engines/releases/download/v1.0/WS12WineSikarugir10.0_6.tar.xz",+ "version": "wine-10.0 (Sikarugir) revision 6"+ },+ "winetricks": {+ "kind": "tool",+ "license": "LGPL-2.1",+ "note": "Pinned to upstream commit 5a59ea07 (20260125+dev, 2026-08-07) — the exact bytes 0.7.x verified with dotnet48. The old branch URL drifted and broke every fresh engine install (issues #27/#28); URLs here must be immutable.",+ "sha256": "f35c29737ca08a583569e6a3752d52fbe23333c5acfad5f16c4177d25eaf3f4b",+ "url": "https://raw.githubusercontent.com/Winetricks/winetricks/5a59ea07513b24093bd90fad943ecf9543cf05bc/src/winetricks"+ },+ "winemac": {+ "kind": "patch",+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/winemac-focus-20260930/winemac-focus-20260930.tar.xz",+ "sha256": "0192214d7d5c7cc8acd13dcacb0c27e8313ef0c64c51b91a93deff0a851a8974",+ "size": 162192,+ "license": "LGPL-2.1+ (Wine; the change in source form is spike/patches/winemac-sikarugir10.0-focus.patch)",+ "version": "20260930",+ "order": 1,+ "extract": {+ "subpath": "winemac.so",+ "into": "engine/lib/wine/x86_64-unix/winemac.so"+ },+ "note": "The Wine archive's winemac.so (sha256 4cbf65e3…) with three byte edits, made and checked by Scripts/build-winemac-focus.sh, re-signed ad hoc under its own identifier: upstream b568eaac4a (no made-up WM_MOUSEACTIVATE when macOS gives a window focus, Wine bug 48121) and both halves of CrossOver Hack #18896 (the driver no longer drops the focus event for a window Wine made key). Replaces the file after the Wine archive unpacks (order 1)."+ }+ },+ "baseEnv": {+ "DYLD_FALLBACK_FRAMEWORK_PATH": "${frameworks}",+ "DYLD_FALLBACK_LIBRARY_PATH": "${frameworks}:${frameworks}/GStreamer.framework/Versions/1.0/lib",+ "GST_PLUGIN_PATH": "${frameworks}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0",+ "WINEDEBUG": "fixme-all",+ "D3DM_MTL4": "0"+ },+ "licenses": {+ "apple-gptk-license-2023-08-17": {+ "applies": [+ "renderers/d3dmetal (bundled in the Sikarugir Template: D3DMetal.framework sha1 1405e5c6… identical to GPTK 3.0-3)",+ "renderers/d3dmetal (GPTK 4.0 beta 2 redist: D3DMetal-4.0b2)"+ ],+ "summary": "Apple Game Porting Toolkit license: non-commercial use/distribution only; no modification; use scoped to developing, testing or evaluating games on Apple hardware.",+ "text": "spike/d3dmetal-license.txt"+ }+ },+ "verified": {+ "date": "2026-09-30",+ "macos": "27.0",+ "chip": "Apple M4",+ "result": "Installed end to end from this manifest on an M4 with macOS 27.0; the installed winemac.so is the published file (sha256 4df20d0d…), the one measured on r15. Not run with a game on this engine: D3DMetal 4 needs Apple's licence, which that Mac has not accepted, and the Wine build and driver are r15's."+ }+}diff --git a/spike/patches/winemac-sikarugir10.0-focus.patch b/spike/patches/winemac-sikarugir10.0-focus.patchnew file mode 100644index 0000000..b1d6c5c--- /dev/null+++ b/spike/patches/winemac-sikarugir10.0-focus.patch@@ -0,0 +1,68 @@+Wine 10.0 Mac driver: give a game its focus back when macOS gives the window focus.++Highball's default engines (x64-sikarugir10.0_6, the main line and the GPTK 4 line) are Gcenx's+Sikarugir build of Wine 10.0, which has no public source for this revision, so these changes ship as+three byte edits to its winemac.so (Scripts/build-winemac-focus.sh makes the file from the published+tarball and checks every byte it touches). This file is the same change in source form, against+wine-10.0's dlls/winemac.drv.++1. window.c, macdrv_window_got_focus: upstream b568eaac4a (wine-10.6, Wine bug 48121). Wine 10 sent+ the game a made-up WM_MOUSEACTIVATE with a non-client hit (HTMENU) before activating it. Unity+ treats that as a click that started in the title bar and ignores the focus gain that follows, so+ after Cmd+Tab, a click on another app or a Dock restore the game kept drawing but dropped every+ click and key (highball#182).++2. and 3. cocoa_window.m, makeFocused and windowDidBecomeKey: CrossOver Hack #18896, as CrossOver+ 26.3 ships it. When Wine itself made a window key (a game calling SetFocus on a window that is+ not the foreground one, which Heartopia's Unity player does at start), the driver dropped the+ focus event macOS sent back, so the window was key on the Mac while Wine kept another window as+ foreground. Raw input only reaches the foreground window, so such a game started with a dead+ mouse. With these, the event reaches Wine and the window becomes the foreground.++diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m+--- a/dlls/winemac.drv/cocoa_window.m++++ b/dlls/winemac.drv/cocoa_window.m+@@ -2130,8 +2130,8 @@+ [self makeKeyWindow];+ causing_becomeKeyWindow = nil;++- [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_GOT_FOCUS) |+- event_mask_for_type(WINDOW_LOST_FOCUS)++ /* CrossOver Hack #18896: don't discard WINDOW_GOT_FOCUS events */++ [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_LOST_FOCUS)+ forWindow:self];+ }++@@ -2907,7 +2907,7 @@+ if (event)+ [self flagsChanged:event];++- if (causing_becomeKeyWindow == self) return;++ /* CrossOver Hack #18896: don't return here based on causing_becomeKeyWindow */++ [controller windowGotFocus:self];+ }+diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c+--- a/dlls/winemac.drv/window.c++++ b/dlls/winemac.drv/window.c+@@ -1899,17 +1899,9 @@++ if (can_window_become_foreground(hwnd) && !(style & WS_MINIMIZE))+ {+- /* simulate a mouse click on the menu to find out+- * whether the window wants to be activated */+- LRESULT ma = send_message(hwnd, WM_MOUSEACTIVATE,+- (WPARAM)NtUserGetAncestor(hwnd, GA_ROOT),+- MAKELONG(HTMENU, WM_LBUTTONDOWN));+- if (ma != MA_NOACTIVATEANDEAT && ma != MA_NOACTIVATE)+- {+- TRACE("setting foreground window to %p\n", hwnd);+- NtUserSetForegroundWindow(hwnd);+- return;+- }++ TRACE("setting foreground window to %p\n", hwnd);++ NtUserSetForegroundWindow(hwnd);++ return;+ }++ TRACE("win %p/%p rejecting focus\n", hwnd, event->window);