Roger Dahl

Results 18 comments of Roger Dahl

I checked now and found that `Screen::pixelRatio()` return `1`.

Thank you for your help! The version I'm using does include a path for Linux in `get_pixel_ratio()`: ``` #elif defined(__linux__) (void) window; /* Try to read the pixel ratio from...

A quick test shows that forcing the return value of `get_pixel_ratio()` to a value above `1` causes everything to scale nicely.

Looks like querying X11 directly could be the way to go. ``` #include DisplayWidth(); DisplayHeight(); DisplayWidthMM(); DisplayHeightMM(); ``` The returned values seem to make sense. I think the mm sizes...

Removing the Linux path and using the `glfwGet` functions did not work (got the small size). But the `xrandr` commands you suggested show what's happening. There is also a 1080p...

How about using `xdpyinfo` on the platforms where it returns correct resolution and physical size? Then calculate DPI.

`glfwGetWindowContentScale()` looks great but before moving to it, it would be a good idea to take a look at how it works and determine how reliable it is likely to...

`glfwGetWindowContentScale()` branches out to platform specific functions. This is the one for X: https://github.com/glfw/glfw/blob/a337c568486025d22443535b7c047a563bc34373/src/x11_monitor.c#L336-L343 I'm not sure if this ends up getting the user specified "logical" DPI or the hardware...

@svenevs Sounds good. I'd be happy to help. Just give me a ping when the PR is ready. I can also help with testing on Linux and Windows.

Is it working for you on other sites? If so, which ones? What's your OS and browser versions?