jeudi 25 juin 2015

Adobe AIR Stage.contentsScaleFactor always 1 on iPhone4s and iPad mini

My application is just a template AIR Mobile AS3 project from FlashDevelop: application.xml file, and a Main class.

In the Main class, I create a text field with stage.contentsScaleFactor value as a text after the first Event.RESIZE:

var textField:TextField = new TextField();
textField.appendText("Size: " + stage.stageWidth + " x " + stage.stageHeight + "\n");
textField.appendText("Scale: " + stage.contentsScaleFactor + "\n");

On my iPhone with retina support, i get

Size: 960 x 640

Scale: 1




Size: 480 x 320

Scale: 1



Almost the same for iPad,

Size: 2048 x 1536

Scale: 1

for high, and

Size: 1024 x 768

Scale: 1

for standard.

I'm compiling with the latest AIR SDK (beta), -swf-version=29. Same results for release AIR SDK 18.

For AIR 14 SDK and -swf-version=25, I get some garbage values for size (it looks like my swf width and height multiplied by what contentsScaleFactor should be), but still 1 for contentsScaleFactor.

Am I missing something important about contentsScaleFactor property? Or how can I determine that my application is running on hidpi display?

Aucun commentaire:

Enregistrer un commentaire