Mouse/stylus Position


MrTAToad

Still Fresh
I've have trouble getting anywhere near accurate stylus positions on a F-200 (and it is calibrated). For instance the left side X position initially returns a position of 200+. Click on the right side, and its 300+. Click on the left side then goes to 30+ pixels

I'm using the standard SDL (and SDL_MOUSEMOVE and MOUSEBUTTONDOWN). I've also tried using SDL_Mouse function, but thats the same.

Any ideas ?
 
MrTAToad said:
I've have trouble getting anywhere near accurate stylus positions on a F-200 (and it is calibrated). For instance the left side X position initially returns a position of 200+. Click on the right side, and its 300+. Click on the left side then goes to 30+ pixels

I'm using the standard SDL (and SDL_MOUSEMOVE and MOUSEBUTTONDOWN). I've also tried using SDL_Mouse function, but thats the same.

Any ideas ?
Im curiious so the touch pad actually generated mouse events? The other method ive seen to use the touchpad is to read the device file. You read the file and get position, pressure. The example was just put in the archives.
 
Last edited by a moderator:
Pickle said:
MrTAToad said:
I've have trouble getting anywhere near accurate stylus positions on a F-200 (and it is calibrated). For instance the left side X position initially returns a position of 200+. Click on the right side, and its 300+. Click on the left side then goes to 30+ pixels

I'm using the standard SDL (and SDL_MOUSEMOVE and MOUSEBUTTONDOWN). I've also tried using SDL_Mouse function, but thats the same.

Any ideas ?
Im curiious so the touch pad actually generated mouse events? The other method ive seen to use the touchpad is to read the device file. You read the file and get position, pressure. The example was just put in the archives.

According to GPH, the touchscreen should act like a mouse, hence the reason for using the SDL mouse stuff - I dont want to start opening device files because the code needs to run across three other operating systems without any extra code.
 
Last edited by a moderator:
MrTAToad said:
According to GPH, the touchscreen should act like a mouse, hence the reason for using the SDL mouse stuff - I dont want to start opening device files because the code needs to run across three other operating systems without any extra code.
GPH seem to be wrong (nothing surprising there), you have to use the /dev/touchscreen/wm97xx device to read touchscreen data from. You're out of luck I'm afraid, you'll have to #ifdef some parts of your code.
 
Last edited by a moderator:
Orkie said:
MrTAToad said:
According to GPH, the touchscreen should act like a mouse, hence the reason for using the SDL mouse stuff - I dont want to start opening device files because the code needs to run across three other operating systems without any extra code.
GPH seem to be wrong (nothing surprising there), you have to use the /dev/touchscreen/wm97xx device to read touchscreen data from. You're out of luck I'm afraid, you'll have to #ifdef some parts of your code.


This is what I expected.
 
Last edited by a moderator:
Back