I want to use different scaling for my game if it's running on a Retina display. How do I detect display's DPI with OpenTK/C#?
Asked
Active
Viewed 512 times
-3
-
Why the downvotes? I can provide more info if needed. – SurvivalMachine Jun 05 '14 at 04:54
1 Answers
0
I found a solution for differentiating between Retina and normal scale on the following page: https://github.com/opentk/opentk/issues/47
Scale factor is calculated with the following code and returns 1 for non-retina and 2 for Retina (at least in OS X):
// game is derived from GameWindow and screenSize
// is given as a parameter for its constructor.
var scale = game.Width / (float)screenSize.X;

SurvivalMachine
- 7,946
- 15
- 57
- 87