Thursday, November 11, 2010

WeTab Dosbox cursor/touchscreen offset

After running dosbox on the WeTab and trying to get one of my all time favorite games to run: Gabriel Knight 1, I found that the touchscreen clicks were not being mapped correctly. This led me on quite a chase.

To start with, I read some of the posts at Vogon concerning touchscreens and Dosbox. It seems that people generally agree that the problem originates inside the SDL libraries.

I removed the 4tiitoo version of the sdllib and compiled it.

i then set the following environment in a terminal window:


With this setting I get strange offsets between where I touch and where the mouse actually ends up clicking. This gap increases as I go up the screen. Have to add some debug message in the source and test.


  1. I also put some inverstigation into this issue. The problem is that the DOS mouse drivers work only with relativ coordinate systems. Inside the games, some acceleration calcs are put over the relative data from the mouse driver. This explains the offsets which are also not constant.
    BTW: I wanted to run Command and Conquer on a WeTab.

  2. Yeah, it seems that the games are messing around with the coordinates they get from SDL because the printfs I threw into the SDL mouse events source appear fine and dandy, I'm not sure if there is a way around this, perhaps force some kind of absolute communication of the coordinates. But I don't really know the details of all this.

  3. Hi. There is a way to bind right mouse click to the tap and hold. You can found original data here:
    1) sudo yum install at-spi
    2) Download mousetweaks rpm from here
    3) sudo yum install libbonoboui gnome-panel
    These are dependences for mousetweaks
    4) sudo yum localinstall --nogpgcheck
    5)run command:
    /usr/libexec/at-spi-registryd & mousetweaks --enable-secondary --secondary-time=0.5 --threshold=30 --daemonize
    6)tap&hold (half of second), release and voila

    Best wishes,