Launch, Window Auto-Focus, Cursor Hide & Frame-Pacing Fix for Silent Hill 2 Remake (GOG) on CrossOver macOS (Apple Silicon)
Note
AI-Generated Tool Disclosure
SH2R-CrossOver-Fix is an AI-generated configuration and launcher patcher created with Antigravity (Google DeepMind) to resolve macOS WindowServer focus race conditions, stuck mouse cursors, and Unreal Engine 5 D3D11/DXMT frame-pacing issues when running the GOG version of Silent Hill 2 Remake (SHProto-Win64-Shipping.exe) in CodeWeavers CrossOver.
When launching Silent Hill 2 Remake from CrossOver or its macOS .app shortcut (Silent Hill 2.app), two problems occur simultaneously:
- macOS
WindowServerEarly Focus Rejection:SHProto-Win64-Shipping.execallsSetFrontProcessWithInfo~1.7 seconds after spawning—before its D3D11 window exists (~3.1 seconds after launch). macOSWindowServerlogs:WindowServer: [SetFrontProcessWithInfo]: CPS: The requested process presents 0 windows, is not a UI element and is frontable. Denying the request. - CrossOver
Menu HelperHolds Foreground Focus & Ignores.lnkWrappers: CrossOver'sMenu Helper(Silent Hill 2.app) becomes the frontmost process with 0 windows and executescxmenu --start. When an entry incxmenu.confhas"Type" = "Windows",cxmenu --startcallswine --startdirectly and completely bypasses custom.lnkshell wrappers indesktopdata/cxmenu/. Furthermore, becauseMenu Helperis signed with Hardened Runtime without thecom.apple.security.automation.apple-eventsentitlement, child processes inherit its TCC identity.
How SH2R-CrossOver-Fix solves it:
- Configures
cxmenu.confwith"Type" = "raw"and runs CrossOver's nativecxmenu --installto register the launch command incxmenu_macosx.plist, then locks"MenuMode" = "frozen"incxbottle.conf. - Installs
focus_and_hide_cursor.sh, which pollsCGWindowListCopyWindowInfountilSHProto-Win64-Shipping.exehas created its layer-0 on-screen window, hidesMenu Helper(NSRunningApplication.hide()) so it yields foreground focus, activates the game window, and warps/moves the cursor to trigger UE5 cursor hiding.
On Apple Silicon Macs (such as M2 Pro / M3), two compounding issues can trap the game at an unplayable ~20 FPS:
- Double-Buffered VSync Frame Drop: When VSync is enabled under Wine/DXMT, a missed 33.3ms (30 FPS) frame deadline on a 60Hz/120Hz display causes macOS presentation to instantly quantize down to the next integer divisor:
60 / 3 = 20 FPS. - UE5 Startup Benchmark Overwrite: Because Unreal Engine 5 cannot recognize the virtualized GPU vendor under Wine, its startup hardware benchmark frequently defaults or resets
GameUserSettings.iniback to Epic preset (sg.*=3) with 100% native resolution (sg.ResolutionQuality=100). At native 1800p with Epic Lumen and heavy volumetric fog, the GPU cannot maintain 30 FPS.
How SH2R-CrossOver-Fix solves it:
- Enforces
"CX_GRAPHICS_BACKEND" = "d3dmetal"incxbottle.confto utilize Apple's official Game Porting Toolkit (GPTK) Metal translation layer. - Enforces an authoritative 1280×800 display resolution (exact 16:10 aspect ratio matching the MacBook display) with aggressive TSR upscaling (
r.ScreenPercentage=75) via launch arguments (-ResX=1280 -ResY=800) andEngine.ini(r.SetRes=1280x800wf), maintaining a stable 24–30 FPS balance without letterboxing and preventing the game from reverting to native 1800p. - Configures Borderless Fullscreen (
FullscreenMode=1/r.SetRes=1280x800wf) to automatically fill the macOS display on boot without manual resolution toggling. - Customizable resolution via environment variables: e.g.
RES_X=1280 RES_Y=800 ./install.sh. - Locks
GameUserSettings.inito read-only (chmod 444) with Medium/Low preset and Low Shadows (sg.ShadowQuality=0), preventing UE5's startup benchmark from resetting to unplayable Epic settings. - Targets a console-style stable 30 FPS cap with VSync enabled: on 1280×800 with 75% TSR scaling, Apple Silicon maintains smooth 24–30 FPS headroom even during intensive combat and dense volumetric fog.
- Injects clean post-processing and memory-capping overrides into
Engine.ini:r.SetRes=1280x800wf— Locks viewport resolution to 1280×800 borderless fullscreen.r.ScreenPercentage=75— Reconstructs internal render buffer with clean TSR anti-aliasing.r.VSync=1— Synchronizes presentation with zero screen tearing.r.Streaming.PoolSize=3072&r.Streaming.LimitPoolSizeToVRAM=1— Caps texture streaming memory strictly to 3 GB, preventing runaway RAM exhaustion and macOS SSD swap thrashing that causes framerates to collapse into single digits over time.r.VolumetricFog.GridPixelSizeFactor=16&r.VolumetricFog.GridSizeZ=64— Halves volumetric fog voxel passes and depth slices in heavy outdoor town and lake sections.r.SceneColorFringe.Max=0&r.SceneColorFringeQuality=0— Completely disables chromatic aberration color-channel separation (fixing unblurred red, green, and blue fringing artifacts).r.DepthOfFieldQuality=0&r.motionblurquality=0— Eliminates heavy blur passes that bottleneck the GPU.r.FilmGrain=0— Cleans up noisy image artifacts.
- D3D11 (
-dx11) + DXMT: Running Silent Hill 2 Remake with-dx11 SAVEWINPOS=1on DXMT avoids Unreal Engine 5's D3D12 Lumen/Nanite pipeline state object (PSO) compilation stalls and indoor lighting glitches on 16 GB Unified Memory Macs. - In-Game Video Cutscenes (
winegstreamer): For FMV cutscenes that freeze due to stock CrossOver missinglibgstlibav.dylib(FFmpeg), pair this fix with HexAid to upgrade CrossOver'sGStreamer.frameworkandDXMTin place.
When launching the GOG version directly through CrossOver shortcuts without the GOG Galaxy client running in the background, Unreal Engine fails its online identity handshake (which defaults to checking Steam/Galaxy). This causes the game to pause at the start screen on every single boot prompting you to "Select a Profile" before it will load your saves.
- How it's resolved:
install.shaddsDefaultPlatformService=NullandbAutoLogin=trueunder[OnlineSubsystem]in your bottle'sEngine.ini. This bypasses online storefront handshakes, auto-authenticates the local player profile, and loads your transferred save games immediately.
If the game crashes instantly upon launch with return code 5:
- Rosetta AVX Advertisement: Unreal Engine 5 requires AVX instructions.
install.shautomatically adds"ROSETTA_ADVERTISE_AVX" = "1"under[EnvironmentVariables]in your bottle'scxbottle.conf. - Apple GPTK Version Mismatch: If you manually upgrade CrossOver's Apple Game Porting Toolkit (GPTK) binaries in
CrossOver.app/Contents/SharedSupport/CrossOver/lib64/apple_gptk/:- Updating
external/D3DMetal.frameworkandexternal/libd3dshared.dylibrequires also updating the companion Wine bridge DLLs inapple_gptk/wine/x86_64-windows/(d3d11.dll,d3d12.dll,dxgi.dll, etc.) from the exact same GPTK release DMG (redist/lib/wine/x86_64-windows/). - Mismatched versions will shift the internal
_gGFXTDispatchtable offset, causingd3d11.dllto jump into an invalid function pointer and crash withEXCEPTION_ACCESS_VIOLATION(0xc0000005) duringDllMain.
- Updating
git clone https://github.com/passs0/SH2R-CrossOver-Fix.git
cd SH2R-CrossOver-Fix
chmod +x install.sh
./install.shinstall.sh automatically locates your CrossOver bottle containing drive_c/GOG Games/Silent Hill 2/SHProto/Binaries/Win64/SHProto-Win64-Shipping.exe (or you can pass a bottle name explicitly: ./install.sh "GOG Galaxy").
install.sh— One-step installer that compilessrc/sh2_focus.m, configurescxmenu.conf, updatescxmenu_macosx.plistvia CrossOver's nativecxmenu --install, updates.lnkwrappers, applies the 60 FPS frame-pacing cap, and cleans temporary/crash logs.src/sh2_focus.m— Native compiled Cocoa/Carbon helper that monitors for the game's layer-0 window, hidesCrossOver.appandMenu Helper, brings the game process to the foreground, activates it via window click, and hides the macOS cursor.scripts/focus_and_hide_cursor.sh— Shell wrapper that invokes the nativesh2_focusbinary (or falls back to AppleScript).scripts/sh2_cheat.py— Standalone offline save modifier and item injector to view save stats, toggle max ammo/health, equip NG+ weapons, and inject any memo, glimpse of the past, ending item, or custom inventory item.
Windows memory trainers (Cheat Engine, FLiNG, WeMod) often fail, crash, or freeze under Wine/CrossOver due to restricted macOS debugging entitlements and DXMT/Metal memory conflicts.
Included in scripts/sh2_cheat.py is a standalone, zero-dependency offline save modifier and item injector written in pure Python 3. It directly parses Unreal Engine 5's compressed VASb / YDBx GVAS save container and repacks it cleanly while preserving exact byte alignment and generating automatic timestamped backups.
- 🛡️ Progression Protection Guard: Unreal Engine 5 uses asynchronous level streaming. Key puzzle items and out-of-sequence story objects cannot be injected safely into saves without causing fatal
EXCEPTION_ACCESS_VIOLATIONcrashes (0x142ac006e). Dangerous key item injection has been permanently stripped to guarantee 100% save stability. - 🔫 Infinite Ammo: Sets Handgun, Shotgun, and Hunting Rifle ammo to 9,999.
- ❤️ Infinite Healing: Sets Health Drinks and Syringes to 999; restores player HP to 100%.
- 🪚 NG+ Chainsaw Early Access: Safely equip the Chainsaw in inventory or revert to the Iron Pipe.
- 📖 Archivist Trophy (Memos): View memo completion progress across playthroughs.
- 👁️ Echoes Trophy (Glimpses): Track environmental flashback discovery from the 2001 classic.
- 📷 Strange Photos: Inspect and track collected polaroids for the Pieces Unarranged trophy.
- 🛡️ Safe & Opt-in: All cheats are toggled OFF by default in the interactive menu; creates automatic
.sav.bak_<timestamp>backups before making any changes.
# View current save file stats, inventory, and collectibles
python3 scripts/sh2_cheat.py --status
# Interactive menu (all toggles OFF by default, select what you want)
python3 scripts/sh2_cheat.py
# Inject max firepower (9,999 ammo + 999 healing + Chainsaw)
python3 scripts/sh2_cheat.py --ammo --health --max-hp --chainsaw
# Inject specific items or memos individually
python3 scripts/sh2_cheat.py --inject-memo LhOW_LostMemories_Note
python3 scripts/sh2_cheat.py --inject-glimpse 24
python3 scripts/sh2_cheat.py --inject-item End_Dog_Key_Full 1
# Restore previous backup
python3 scripts/sh2_cheat.py --restoreReleased under the MIT License.