diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-11-22 12:00:15 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-11-22 12:00:59 +0100 |
commit | 4f32d6127a7f12ed5c3c4d01790dc87237c0e1b8 (patch) | |
tree | b33b7ada0e1072456912d8e7905268ebbe3876a0 /scripts | |
parent | 3dd45a79f2c1d3329992c6a7df26edb197031b23 (diff) |
Fix rotation functionality in simulator script interface.
Reviewed-by: owolff
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/examples/rotate.qs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/examples/rotate.qs b/scripts/examples/rotate.qs index 605e129..4d35f49 100644 --- a/scripts/examples/rotate.qs +++ b/scripts/examples/rotate.qs @@ -1,2 +1,10 @@ -// This example lets the simulator rotate -simulator.rotate(); +var supported = simulator.supportedScreenOrientations() +print("supported screen orientations: " + supported) + +for (var i in supported) { + var orientation = supported[i] + if (orientation != simulator.deviceOrientation()) { + simulator.setDeviceOrientation(orientation, true) + break + } +} |