How to determine if on retina


Hi, is there a definitive way of doing this? Having trouble covering all bases.

For instance, on my monitor, for the main display I get the following:
Scale: 1, Width: 3840

So this is fine.
For a client, we get:
Scale: 2, Width: 1280, on a retina display
So I assume here, I can multiple 1280*2 = 2560, so that’s retina

However, if I scale my monitor to be 1920x1080 then I get:
Scale: 2, Width: 1920 - so if I did the multiplication again here, that would come to 3840 which would register as retina even though it’s not.

So, is there a better way to determine if I’m on a retina screen or not?



In the demoRunner/systemInfoDemo the DPI info ?


Client gets 144 dpi on his monitor - so do I, for both 1920 and 2560 resolution (funnily enough when running at 3840 is goes down to 72)


Ok, I understand, you can get the retina mode active but it seems you need to have the materiel info to know if you are on a retina display hardware.


What are you using this information for?
“Retina” is an Apple marketing term, you’ll have to think in terms of resolution and scale factor to cover all bases and what this means.


I have 2 sets of assets - I want to use the hi-res assets if on a “retina” screen, i.e. an apple screen with 2560 or higher horizontal res.


I think for that you need to use the bounds of your Component and the scale factor of the Graphics context passed to paint to figure out what the appropriate asset is.

Remember, on desktop your app can move between windows so the resolution and scale will change and you’ll need to react to this.


thanks for the suggestion - will give it a go


Not sure how to do this…?