# Display scaling (/docs/guides/display-scaling)

How desktop scale, framebuffer pixels and CHUDCS2 content scale interact.

CHUDCS2 draws its menu and overlay in physical framebuffer pixels. Desktop scaling controls native window and surface coordinates. `menu_scale` and overlay preferences control application content.

## Menu [#menu]

GLFW window sizes and cursor positions use native coordinates. The ImGui GLFW backend can opt into physical pixel coordinates so `DisplaySize` uses the framebuffer size and `DisplayFramebufferScale` remains `(1, 1)`. Cursor sampling and warping convert between native and physical coordinates at the boundary.

The menu uses an 820 × 620 base size multiplied by `menu_scale`. Fonts and style metrics are rebuilt when the application scale changes. Desktop scale changes update the window size and framebuffer dimensions without rerasterizing fonts unless `menu_scale` also changes.

## Overlay [#overlay]

Wayland layer configure events provide logical dimensions. When fractional-scale and viewporter protocols are available, CHUDCS2 renders to a physical buffer, crops the source rectangle, and maps it to the logical destination. Without both protocols, it uses the selected output's integer buffer scale.

X11 rendering uses actual framebuffer dimensions and keeps placement in X11 coordinates. Stretched, centered and custom modes retain their configured geometry semantics.

## Debugging scale issues [#debugging-scale-issues]

Check the selected monitor, scaling mode, game dimensions, and `menu_scale` first. Compare the reported framebuffer size with the configured window size, then test `--x11` to separate backend issues from geometry issues.
