How to detect the backingScaleFactor on 4K LG monitor ?

I can quite move my macOS app's main window from my built-in Retina display to my external monitor (Samsung TV normal resolution) and everything works well because

mScaleDisplay = [[NSScreen mainScreen] backingScaleFactor];


gives me the proper values: 2.0 on my Retina display and 1.0 on the Samsung TV. So I can properly set up the content of the window.


Anyway it doesn't work on my customer's monitor 4K by LG (lg-27UD59-B) and macOS 10.14.1 Mojave. He sees a big image as it was a 1:1 resolution monitor.

So I ask: how could I detect the resolution of this monitor?


Is your costumer's 4k monitor set to a Hi-DPI mode or not? Try to use the NSWindow backingScaleFactor property, mainScreen could return a different screen.

Could be a 10.14.1 bug, any reason to be on that buggy version?
How to detect the backingScaleFactor on 4K LG monitor ?
 
 
Q