On my Mac Mini I have an ASUS screen with (according to the specs) a resolution of 1920x1054 and a pixel size of 0.272mm.
These numbers make sense as my screen width is approx. 52.5cm with 1920 x 0.272 = 522 mm (to be compared to 52.5cm measured) while my screen height is approx.29 cm with 1054 x 0.272 = 287mm which is close enough to what I should measure.
So far so good. This yields to a confirmed pixel resolution of 25.4 / 0.272 = 93.4 dpi.
However when I call the following methods:
double dpi = Desktop::getInstance().getDisplays().getMainDisplay().dpi;
double scale = Desktop::getInstance().getDisplays().getMainDisplay().scale;
I get dpi = 72 and scale = 1.
Am I doing something wrong, or is it the screen that does not return the right dpi value to the system or what ?
Any help appreciated.
Thanx
P.S. the setGlobalFactor is an awesome feature but I need the right dpi to calculate the right factor for it to be useful.
