How can I detect if my game is running on an iPad?

Monkey Targets Forums/iOS/How can I detect if my game is running on an iPad?

benmc(Posted 2012) [#1]
As the title reads, does anyone know how I can detect whether or not my game is running on the iPad? Controls need adjusting for the huge screen, but I don't know how to tell other than to possibly read the devicewidth/height. Is that pretty much it?


Soap(Posted 2012) [#2]
You will need to add something like this.



Or use: http://www.monkeycoder.co.nz/Community/posts.php?topic=954

Get Device Type (IPod, IPhone, IPad) as String
- GetDeviceType$()


Earok(Posted 2013) [#3]
Just out of curiosity, is there any reason something along these lines wouldn't work?

isIpad = (DeviceHeight()/DeviceWidth() = .75) or (DeviceWidth()/DeviceHeight() = .75)


SLotman(Posted 2013) [#4]
The iPad "mini" has a different aspect ratio. But it should still identify as an iPad.


Earok(Posted 2013) [#5]
iPad mini's resolution is 1024x768, same aspect ratio