Wrong stage size on MBP Retina
Hi, i'm not sure if it's a bug or i'm doing something wrong, but i don't get the right stage bounds on my Macbook Pro Retina.
I already set <requestedDisplayResolution>high</requestedDisplayResolution> inside the initialWindow tag, but stage.fullScreenWidth returns always 1440 instead of 2880 and stage.stageWidth returns wrong values also.
I made tests with AIR SDKs 3.7, 3.8, 3.9 and 4.0, but no one worked for me.
Am i overlooking something?
Here's the code i'm using:
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.text.TextField;
import flash.text.TextFormat;
public class Test extends Sprite
{
private var console : TextField;
public function Test()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, onStageResize);
console = new TextField();
console.defaultTextFormat = new TextFormat("_sans", 12);
console.width = stage.stageWidth;
console.height = stage.stageHeight;
console.wordWrap = true;
console.multiline = true;
addChild(console);
}
private function onStageResize(event : Event) : void
{
output("***********************************************");
output('stage.contentsScaleFactor: ' + (stage.contentsScaleFactor));
output('stage.stageWidth: ' + (stage.stageWidth));
output('stage.stageHeight: ' + (stage.stageHeight));
output('stage.fullScreenWidth: ' + (stage.fullScreenWidth));
output('stage.fullScreenHeight: ' + (stage.fullScreenHeight));
console.width = stage.stageWidth;
console.height = stage.stageHeight;
}
private function output(... $text) : void
{
var text:String = $text.join(", ");
console.appendText(text+"\n");
trace(text);
}
}
}
Thanks in advance,
Solano
