aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-02-15 17:16:04 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-05 14:14:39 -0800
commit8dd31e8e10fc3ca10192368acf19d2345eeddde7 (patch)
tree7c469657616d59c3a2723ec446f528d4bbaee56d /android/main.c
parentbf45fc2a26358b7ec52cb17bb9d6ed67d6483b01 (diff)
downloadexternal_qemu-8dd31e8e10fc3ca10192368acf19d2345eeddde7.zip
external_qemu-8dd31e8e10fc3ca10192368acf19d2345eeddde7.tar.gz
external_qemu-8dd31e8e10fc3ca10192368acf19d2345eeddde7.tar.bz2
Multi-touch emulation support
Change-Id: I311dc55fe10f41637775baa330a7c732ff317f51
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/android/main.c b/android/main.c
index b7421a1..2723834 100644
--- a/android/main.c
+++ b/android/main.c
@@ -1271,6 +1271,30 @@ int main(int argc, char **argv)
args[n++] = "socket,vlan=1,mcast=230.0.0.10:1234";
}
+ /* Setup screen emulation */
+ if (opts->screen) {
+ if (!strcmp(opts->screen, "touch")) {
+ hw->hw_touchScreen = 1;
+ hw->hw_multiTouch = 0;
+ } else if (!strcmp(opts->screen, "multi-touch")) {
+ hw->hw_multiTouch = 1;
+ hw->hw_touchScreen = 0;
+ } else if (!strcmp(opts->screen, "off")) {
+ hw->hw_touchScreen = 0;
+ hw->hw_multiTouch = 0;
+ } else {
+ derror("Invalid value for -screen <mode> parameter: %s\n", opts->screen);
+ derror("Valid values are: touch, multi-touch, or off\n");
+ exit(1);
+ }
+ } else {
+ /* If both, touch and multitouch are set in hw.ini, choose multi-touch
+ * for screen emulation. */
+ if (hw->hw_touchScreen && hw->hw_multiTouch) {
+ hw->hw_touchScreen = 0;
+ }
+ }
+
while(argc-- > 0) {
args[n++] = *argv++;
}