Skip to content

[platform/glfw] fix highdpi for linux-wayland#5565

Closed
CrackedPixel wants to merge 1 commit into
raysan5:masterfrom
CrackedPixel:fix-glfw-wayland
Closed

[platform/glfw] fix highdpi for linux-wayland#5565
CrackedPixel wants to merge 1 commit into
raysan5:masterfrom
CrackedPixel:fix-glfw-wayland

Conversation

@CrackedPixel

Copy link
Copy Markdown
Contributor

This fixes the highdpi issues on linux-wayland brought up today. This needs more user testing if available, especially for macos!

Tested on windows (native), windows (wine), linux-x11, and linux-wayland with various DPI settings

notes:

  • linux-x11 doesnt seem to support fractional scaling and will round up to 2.0x (200%) instead of 1.25x (125%) etc
  • windows (wine) doesnt seem to support dpi scaling at all so it was always 1.0x (100%)

// Framebuffer scaling is activated with: glfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_TRUE);

// Screen scaling matrix is required in case desired screen area is different from display area
CORE.Window.screenScale = MatrixScale(scaleDpi.x, scaleDpi.y, 1.0f);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a duplicate from line 1661 and needed removed

@CrackedPixel

Copy link
Copy Markdown
Contributor Author

Actually nevermind, someone beat me to it and did it better 🤣

https://github.com/raysan5/raylib/pull/5564/changes

@CrackedPixel CrackedPixel deleted the fix-glfw-wayland branch February 21, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant