summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-11-22 12:00:15 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2010-11-22 12:00:59 +0100
commit4f32d6127a7f12ed5c3c4d01790dc87237c0e1b8 (patch)
treeb33b7ada0e1072456912d8e7905268ebbe3876a0 /scripts
parent3dd45a79f2c1d3329992c6a7df26edb197031b23 (diff)
Fix rotation functionality in simulator script interface.
Reviewed-by: owolff
Diffstat (limited to 'scripts')
-rw-r--r--scripts/examples/rotate.qs12
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
+ }
+}