Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uiconfiguration: fix DPI for bad screen metadata
Some screens don't report their physical size in their EDID, for instance the Samsung Neo G9 in its 5120x1440 configuration. When that happens, on Linux xrandr reports the physical size as 1mmx1mm, which is obviously invalid, and results in a computed DPI so high that the default view is a totally blank screen, and the max zoomed-out level still only covers a fraction of the score. While it's possible for users to force the DPI via a command-line argument, having a sensible default value to begin with is much better, especially for nontechnical users. While I only encountered the issue on Linux (due to not having Windows available in the first place) I deliberately left the check on the common codepath as I figured that a 1mm*1mm screen must be invalid no matter the platform. Fixes musescore#16002.
- Loading branch information