Fixed wacom emulation

- for absolute mode, scale coordinates to the real device maximum values,
since some drivers (on Haiku and Linux at least) need them as such,
and the HID descriptor is boggus on some models anyway,
- keep the coordinates even when no button is pressed, on real tablet
the pen is sensed on the surface even without direct contact,
and drivers expect this,
- map left button to pressure according to what the Haiku driver wants,
- map the right button to the pen button,
- map the middle button to the eraser,
- use asynchronous reporting as the hid code does, stops the Haiku driver
(and probably others) from spending 50% cpu polling for changes.

Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
1 file changed
tree: 5702631cd3cd589645b3fb73b315e4c9c9f78d21
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. fpu/
  7. gdb-xml/
  8. hw/
  9. linux-user/
  10. pc-bios/
  11. roms/
  12. slirp/
  13. target-alpha/
  14. target-arm/
  15. target-cris/
  16. target-i386/
  17. target-m68k/
  18. target-microblaze/
  19. target-mips/
  20. target-ppc/
  21. target-sh4/
  22. target-sparc/
  23. tcg/
  24. tests/
  25. .gitignore
  26. .gitmodules
  27. a.out.h
  28. acl.c
  29. acl.h
  30. aes.c
  31. aes.h
  32. aio.c
  33. alpha-dis.c
  34. alpha.ld
  35. arm-dis.c
  36. arm-semi.c
  37. arm.ld
  38. balloon.h
  39. block.c
  40. block.h
  41. block_int.h
  42. bswap.h
  43. bt-host.c
  44. bt-host.h
  45. bt-vhci.c
  46. buffered_file.c
  47. buffered_file.h
  48. cache-utils.c
  49. cache-utils.h
  50. Changelog
  51. check-qdict.c
  52. check-qint.c
  53. check-qlist.c
  54. check-qstring.c
  55. cmd.c
  56. cmd.h
  57. cocoa.m
  58. CODING_STYLE
  59. config.h
  60. configure
  61. console.c
  62. console.h
  63. COPYING
  64. COPYING.LIB
  65. cpu-all.h
  66. cpu-common.h
  67. cpu-defs.h
  68. cpu-exec.c
  69. create_config
  70. cris-dis.c
  71. curses.c
  72. curses_keys.h
  73. cutils.c
  74. d3des.c
  75. d3des.h
  76. def-helper.h
  77. device_tree.c
  78. device_tree.h
  79. dis-asm.h
  80. disas.c
  81. disas.h
  82. dma-helpers.c
  83. dma.h
  84. dyngen-exec.h
  85. elf.h
  86. envlist.c
  87. envlist.h
  88. exec-all.h
  89. exec.c
  90. feature_to_c.sh
  91. gdbstub.c
  92. gdbstub.h
  93. gen-icount.h
  94. host-utils.c
  95. host-utils.h
  96. hostregs_helper.h
  97. hpet.h
  98. hppa-dis.c
  99. hppa.ld
  100. hxtool
  101. i386-dis.c
  102. i386.ld
  103. ia64.ld
  104. ioport-user.c
  105. ioport.c
  106. ioport.h
  107. keymaps.c
  108. keymaps.h
  109. kvm-all.c
  110. kvm.h
  111. libfdt_env.h
  112. LICENSE
  113. linux-aio.c
  114. m68k-dis.c
  115. m68k-semi.c
  116. m68k.ld
  117. MAINTAINERS
  118. Makefile
  119. Makefile.hw
  120. Makefile.target
  121. Makefile.user
  122. microblaze-dis.c
  123. migration-exec.c
  124. migration-fd.c
  125. migration-tcp.c
  126. migration-unix.c
  127. migration.c
  128. migration.h
  129. mips-dis.c
  130. mips.ld
  131. module.c
  132. module.h
  133. monitor.c
  134. monitor.h
  135. nbd.c
  136. nbd.h
  137. net-checksum.c
  138. net.c
  139. net.h
  140. osdep.c
  141. osdep.h
  142. path.c
  143. pci-ids.txt
  144. posix-aio-compat.c
  145. ppc-dis.c
  146. ppc.ld
  147. ppc64.ld
  148. qdict-test-data.txt
  149. qdict.c
  150. qdict.h
  151. qemu-aio.h
  152. qemu-binfmt-conf.sh
  153. qemu-char.c
  154. qemu-char.h
  155. qemu-common.h
  156. qemu-config.c
  157. qemu-config.h
  158. qemu-doc.texi
  159. qemu-img-cmds.hx
  160. qemu-img.c
  161. qemu-img.texi
  162. qemu-io.c
  163. qemu-lock.h
  164. qemu-log.h
  165. qemu-malloc.c
  166. qemu-monitor.hx
  167. qemu-nbd.c
  168. qemu-nbd.texi
  169. qemu-option.c
  170. qemu-option.h
  171. qemu-options.hx
  172. qemu-queue.h
  173. qemu-sockets.c
  174. qemu-tech.texi
  175. qemu-thread.c
  176. qemu-thread.h
  177. qemu-timer.h
  178. qemu-tool.c
  179. qemu.sasl
  180. qemu_socket.h
  181. qint.c
  182. qint.h
  183. qlist.c
  184. qlist.h
  185. qobject.h
  186. qstring.c
  187. qstring.h
  188. readline.c
  189. readline.h
  190. README
  191. rules.mak
  192. s390-dis.c
  193. s390.ld
  194. savevm.c
  195. sdl.c
  196. sdl_keysym.h
  197. sdl_zoom.c
  198. sdl_zoom.h
  199. sdl_zoom_template.h
  200. sh4-dis.c
  201. softmmu-semi.h
  202. softmmu_defs.h
  203. softmmu_exec.h
  204. softmmu_header.h
  205. softmmu_template.h
  206. sparc-dis.c
  207. sparc.ld
  208. sparc64.ld
  209. sysemu.h
  210. tap-win32.c
  211. targphys.h
  212. tcg-runtime.c
  213. texi2pod.pl
  214. thunk.c
  215. thunk.h
  216. TODO
  217. translate-all.c
  218. uboot_image.h
  219. usb-bsd.c
  220. usb-linux.c
  221. usb-stub.c
  222. VERSION
  223. vgafont.h
  224. vl.c
  225. vnc-auth-sasl.c
  226. vnc-auth-sasl.h
  227. vnc-auth-vencrypt.c
  228. vnc-auth-vencrypt.h
  229. vnc-tls.c
  230. vnc-tls.h
  231. vnc.c
  232. vnc.h
  233. vnc_keysym.h
  234. vnchextile.h
  235. x86_64.ld
  236. x_keymap.c
  237. x_keymap.h