Mac Retina Support Standalone OSX

I’m building a standalone OSX app in Unity 2017.4 that supports windowed and fullscreen resolutions.
I am setting the windowed mode resolution in the following way:

float windowHeight = Display.main.systemHeight * 0.85f; //85% of system height
float windowWidth = windowHeight / 1.3461f; // the aspect ratio
Screen.SetResolution(Mathf.RoundToInt(windowWidth),Mathf.RoundToInt(windowHeight), false);

The build appears as expected:


However, if I now build by checking PlayerSettings > Mac Retina Support , Though the systemHeight value remains the same, the entire window is scaled down by 2 :

This behavior is only seen in some mac systems that I guess have to do with, HiDPI? How can I detect such devices so that I can double the width and height while setting windowed resolution for only those devices? Thanks.


We’ve got the exact same issue as described here, any update on this issue?