aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-05 14:20:00 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-05 14:20:00 -0800
commit025a347156acb6c22444f7d4d06c0f44da573c5e (patch)
tree8252ef05e1127002f2b0fa4c5452bbce4e603571 /android/main.c
parent7fc0c500e5bcb4fad084302d217708a7a07da452 (diff)
parent8dd31e8e10fc3ca10192368acf19d2345eeddde7 (diff)
downloadexternal_qemu-025a347156acb6c22444f7d4d06c0f44da573c5e.zip
external_qemu-025a347156acb6c22444f7d4d06c0f44da573c5e.tar.gz
external_qemu-025a347156acb6c22444f7d4d06c0f44da573c5e.tar.bz2
Merge "Multi-touch emulation support"
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++;
}