aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
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++;
}