| Summary: | SDL_GetDisplayDPI returns a wrong value on Linux and FreeBSD (X11) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Lena <magiruuvelvet> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | 2.0.4 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | X11: a sample code that works and returns the correct DPI | ||
|
Description
Lena
2016-08-01 09:05:02 UTC
Created attachment 2535 [details]
X11: a sample code that works and returns the correct DPI
Does the program from "test/testdisplayinfo.c" also report a wrong value? And is XRandR support activated on the two systems and also compiled into SDL? There are two implementations to get the DPI in SDL (both in "src/video/x11/SDL_x11modes.c"). The older looks similar to the attached sample. It is used if no XRandR support is available. The test program has the same values as my code had. INFO: DPI: ddpi=128.876648; hdpi=128.336838; vdpi=130.628571 This are the X11 libraries my SDL2 build is using: xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode Maybe a compute issue in the XRandR code? |