No, this is just for determining the monitor’s physical DPI, not UI “DPI” which may be different.
Haiku does not actually have anything like a “scale factor” which other OSes do, and pixels are always just pixels, never “device pixels” or “logical pixels” or anything else (well, unless you SetScale
in a BView
, but that’s just as with any other UI toolkit’s drawing API.) Instead, Haiku scales the user interface purely based on font size, and derives all metrics from that one way or another.
If you really need something more like a “scaling factor”, as non-native ported applications commonly do, you can either do max(1.0f, be_plain_font->Size() / 12.0f)
; or if you are at least a bit more flexible than that, you can ask BControlLook
for the current spacing metrics and use those to decide how much you want to scale things by.