diff -ru qemu/sdl.c qemu-touch/sdl.c --- qemu/sdl.c 2007-06-19 09:34:11.000000000 -0700 +++ qemu-touch/sdl.c 2007-06-19 09:30:25.000000000 -0700 @@ -306,8 +306,10 @@ } SDL_GetMouseState(&dx, &dy); - dx = dx * 0x7FFF / width; - dy = dy * 0x7FFF / height; + if(!use_absolute_screen_coordinates) { + dx = dx * 0x7FFF / width; + dy = dy * 0x7FFF / height; + } } else if (absolute_enabled) { sdl_show_cursor(); absolute_enabled = 0; diff -ru qemu/vl.c qemu-touch/vl.c --- qemu/vl.c 2007-06-19 09:34:12.000000000 -0700 +++ qemu-touch/vl.c 2007-06-19 09:33:31.000000000 -0700 @@ -147,6 +147,7 @@ static DisplayState display_state; int nographic; const char* keyboard_layout = NULL; +int use_absolute_screen_coordinates = 0; int64_t ticks_per_sec; int boot_device = 'c'; int ram_size; @@ -543,7 +544,7 @@ if (mouse_event) { if (graphic_rotate) { - if (qemu_put_mouse_event_current->qemu_put_mouse_event_absolute) + if (qemu_put_mouse_event_current->qemu_put_mouse_event_absolute && !use_absolute_screen_coordinates) width = 0x7fff; else width = graphic_width; @@ -4319,6 +4320,9 @@ dev = usb_mouse_init(); } else if (!strcmp(devname, "tablet")) { dev = usb_tablet_init(); + } else if (!strcmp(devname, "touchscreen")) { + use_absolute_screen_coordinates = 1; + dev = usb_tablet_init(); } else if (strstart(devname, "disk:", &p)) { dev = usb_msd_init(p); } else if (!strcmp(devname, "wacom-tablet")) { diff -ru qemu/vl.h qemu-touch/vl.h --- qemu/vl.h 2007-06-19 09:34:12.000000000 -0700 +++ qemu-touch/vl.h 2007-06-19 09:30:25.000000000 -0700 @@ -154,6 +154,7 @@ extern int graphic_height; extern int graphic_depth; extern const char *keyboard_layout; +extern int use_absolute_screen_coordinates; extern int kqemu_allowed; extern int win2k_install_hack; extern int usb_enabled;