Just a heads up… There might be a bug somewhere with .height .width of display resolution when using HIDPI screens when scaling is not = 1. See the thread below, which might be applicable to you use-case.
I have not filed a case on this yet as I want to do some more testing on additional machines. In my case, the resolution returned when using HIDPI with scaling is not correct. Geoff did update the documents to indicate when using HIDPI you need to multiply the scaling by the returned .height / .width to get proper screen resolution.