Skip to content

Commit

Permalink
avm2: Stub orientation-related Stage API
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh authored and Lord-McSweeney committed Jul 22, 2024
1 parent c6fb941 commit 92b94d1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions core/src/avm2/globals/flash/display/Stage.as
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,46 @@ package flash.display {
this._mouseLock = value;
}

[API("668")]
public static function get supportsOrientationChange():Boolean {
stub_getter("flash.display.Stage", "supportsOrientationChange");
return false;
}

[API("671")]
public function get supportedOrientations():Vector.<String> {
stub_getter("flash.display.Stage", "supportedOrientations");
return new Vector.<String>();
}

[API("668")]
public function get autoOrients():Boolean {
stub_getter("flash.display.Stage", "autoOrients");
return false;
}

[API("668")]
public function set autoOrients(value:Boolean):void {
stub_setter("flash.display.Stage", "autoOrients");
}

[API("668")]
public function get orientation():String {
stub_getter("flash.display.Stage", "orientation");
return StageOrientation.UNKNOWN;
}

[API("668")]
public function get deviceOrientation():String {
stub_getter("flash.display.Stage", "deviceOrientation");
return StageOrientation.UNKNOWN;
}

[API("668")]
public function setOrientation(newOrientation:String):void {
stub_method("flash.display.Stage", "setOrientation");
}

[API("668")]
public function setAspectRatio(newAspectRatio:String):void {
stub_method("flash.display.Stage", "setAspectRatio");
Expand Down

0 comments on commit 92b94d1

Please sign in to comment.