• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

iOS How to get the dpi on iOS?

sman

Member
Hello,

display_get_dpi_x returns wrong values on iOS: "Mac and iOS do not return specific dpi settings but appear to return the same values as the OS, which are not correct (but will have to do) as Apple do not give the correct values."

However I really need that value to create virtual keys with the size of a finger.
I've tried to use os_device to hardcode the dpi depending on the device but this is not enough:
  • device_ios_ipad_retina: there are some with 264 dpi and others with 326 dpi (iPad mini 2, 3, 4)
  • it misses the iPhone 7,8,9,X and future devices

How do you do?
 
Top