aboutsummaryrefslogtreecommitdiffstats
path: root/android/skin
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-18 17:39:44 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-18 17:39:44 -0700
commit9877e2e3e3c2df64de306b48f80a4f5d0b028d95 (patch)
tree8a31dd7a07d55c182e7f572379a601ef545c1d29 /android/skin
parentb3ee93a038ab992ffdda9f232befdea6ea713b24 (diff)
downloadexternal_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.zip
external_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.tar.gz
external_qemu-9877e2e3e3c2df64de306b48f80a4f5d0b028d95.tar.bz2
auto import from //branches/cupcake_rel/...@140373
Diffstat (limited to 'android/skin')
-rw-r--r--android/skin/window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/android/skin/window.c b/android/skin/window.c
index 13bdca9..7ce5759 100644
--- a/android/skin/window.c
+++ b/android/skin/window.c
@@ -15,6 +15,7 @@
#include "android/charmap.h"
#include "android/utils/debug.h"
#include "android/utils/display.h"
+#include "android/hw-sensors.h"
#include <SDL_syswm.h>
#include "qemu-common.h"
#include <math.h>
@@ -1204,6 +1205,11 @@ skin_window_reset_internal ( SkinWindow* window, SkinLayout* slayout )
if (slayout->event_type != 0) {
kbd_generic_event( slayout->event_type, slayout->event_code, slayout->event_value );
+ /* XXX: hack, replace by better code here */
+ if (slayout->event_value != 0)
+ android_sensors_set_coarse_orientation( ANDROID_COARSE_PORTRAIT );
+ else
+ android_sensors_set_coarse_orientation( ANDROID_COARSE_LANDSCAPE );
}
return 0;