Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / mapping between iOS devices and their resolutions, may be useful to others

Author
Message
Jerry McGuire
7
Years of Service
User Offline
Joined: 25th Mar 2017
Location:
Posted: 3rd May 2019 19:58 Edited at: 7th May 2019 19:53
Hi,
as some of you may know, the commands GetMaxDeviceWidth() and GetMaxDeviceHeight() don't work for certain iOS devices.
I have used a workaround that took me a while to implement: retrieving the device name and then setting the resolution according to the device name. For this I used the link that xCept graciously provided to me (see https://forum.thegamecreators.com/thread/222755) together with the resolutions that appear on Wikipedia (https://en.wikipedia.org/wiki/List_of_iOS_devices).

I'm putting the corresponding C++ code below; only devices compatible with iOS>=9.35 are specified. It's readable, so it benefits both Tier 2 and Tier 1 users.
Cheers,

AppGameKit 2018.10.10

iMac Book Pro, MacOS 10.14, Xcode 10.1;
iPhone 6, iOS 12; iPad (3rd gen), iOS 9.35; iPad Pro 12'9 (2nd gen), iOS 12.

Dell Precision T7400, Windows 7 Professional 64bit, Visual Studio Community 2017;

Login to post a reply

Server time is: 2024-04-26 08:53:55
Your offset time is: 2024-04-26 08:53:55