Skip to content

DPI awareness, monitor geometry

elseform edited this page Jun 7, 2026 · 1 revision

If you play GAMMA/Anomaly on macOS through Wine the game may look a bit wrong even when the in-game and display resolution are set to 1920x1080. Weapon HUD position, lighting, scopes, night vision, blur, bloom, SSAO, and other screen-space effects can shift because Wine may expose a different effective display geometry than the one you think you are using.

The problem is most apparent if you use an app like BetterDisplay to handle your external display - if set to 1080p HiDPI - internally that may involve a larger backing resolution or different scaling path. Wine can then report display size, DPI, or Retina/backing behavior in a way that does not match the intended 1920x1080 game setup.

The X-Ray engine does not reason in such terms. It consumes the Windows/D3D values Wine gives it.

The important chain is:

Wine/macOS display state
-> Windows monitor/window/D3D values
-> Device.dwWidth / Device.dwHeight
-> Device.fASPECT
-> scene projection, HUD projection, screen-space shader constants

The Fix

Force Wine to behave like a plain 1080p Windows display regardless of the resolution used to not rely on auto-detection:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Wine\Mac Driver]
"RetinaMode"="n"

[HKEY_CURRENT_USER\Control Panel\Desktop]
"LogPixels"=dword:00000060
"Win8DpiScaling"=dword:00000000

Gamma Setup Tool exposes this setting on wrapper creation.

Engine evidence

Camera aspect is derived from device dimensions and then rebuilds both scene and HUD projection matrices in CameraManager.cpp

That means a bad display/backbuffer interpretation can affect both the world camera and the first-person weapon/HUD camera.

Relevant shader and script examples: /shaders/r3/models_lfo_light_dot_weapons.ps /shaders/r3/night_vision.h /shaders/r3/scope_common.h /scripts/dialog_fov.script

Clone this wiki locally