Closed 3dDeters closed 8 years ago
Hi! Thanks for submitting this. After reading through it I'm not sure it's going to work. You're still assigning the resolution to a global variable, but the canvas is created using the local. Also, the resolution has three parts, the width, height, and depth (which is normally 32). And the canvas creation code needs all three but your code would only give two. Make some tweaks to fix these things and then I'll merge.
Making resolution a global variable was something I did for my personal uses in managing aspect ratio to prevent screen stretching on different devices. I could add my aspect ratio code later, but It still needs some work. I just made the screen depth 32, but I will check if there is a way to read the screen depth directly from iOS in the same way I did hight and width.
I also think my changes make many things in the iOS parts of the engine unnecessary, but I don't want to be the judge of that. I'm just not sure what all can and can not be deleted safely.
Changes are looking good! I have one more request. The if statement currently wrapped around creating the canvas is checking to make sure there is a device type in the prefs. Since it won't be using this anymore you should check instead that the platform is "iOS" similar to the Android check below. So something like:
if($platform $= "iOS")
If you make that change I'll be ready to merge.
This is a change that should allow any game to display properly on any iOS device in about the same way it does on Android.